aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-server/src/handlers (follow)
Commit message (Collapse)AuthorAge
* chore: move crates into crates/ dir (#1958)Ellie Huxtable2024-04-18
| | | | I'd like to tidy up the root a little, and it's nice to have all the rust crates in one place
* feat(server): add me endpoint (#1954)Ellie Huxtable2024-04-16
|
* chore(ci): Add codespell support (config, workflow) and make it fix some ↵Yaroslav Halchenko2024-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typos (#1916) * Add github action to codespell main on push and PRs * Add rudimentary codespell config * ignore crate, inbetween etc * [DATALAD RUNCMD] run codespell throughout fixing typo automagically but ignoring the failure due to ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * [DATALAD RUNCMD] Do interactive fixing of leftover ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
* fix(sync): record size limiter (#1827)Ellie Huxtable2024-03-05
| | | | Settings the record size limit to 0 had issues. Inverting the condition works better.
* feat: add `store push --force`Ellie Huxtable2024-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will 1. Wipe the remote store 2. Upload all of the local store to remote Imagine the scenario where you end up with some mixed keys locally :( You confirm this with ``` atuin store verify ``` You then fix it locally with ``` atuin store purge ``` Ensure that your local changes are reflected remotely with ``` atuin store push --force ``` and then (another PR, coming soon), update all other hosts with ``` atuin store pull --force ```
* feat: Add change-password command & support on server (#1615)TymanWasTaken2024-01-29
| | | | | | | | | | | * Add change-password command & support on server * Add a test for password change * review: run format --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* chore(deps): update axum (#1637)Conrad Ludgate2024-01-28
|
* feat: add registered and deleted metrics (#1622)Ellie Huxtable2024-01-23
|
* feat: add metrics counter for records downloaded (#1584)Ellie Huxtable2024-01-17
|
* feat: rework record sync for improved reliability (#1478)Ellie Huxtable2024-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: rework record sync for improved reliability So, to tell a story 1. We introduced the record sync, intended to be the new algorithm to sync history. 2. On top of this, I added the KV store. This was intended as a simple test of the record sync, and to see if people wanted that sort of functionality 3. History remained syncing via the old means, as while it had issues it worked more-or-less OK. And we are aware of its flaws 4. If KV syncing worked ok, history would be moved across KV syncing ran ok for 6mo or so, so I started to move across history. For several weeks, I ran a local fork of Atuin + the server that synced via records instead. The record store maintained ordering via a linked list, which was a mistake. It performed well in testing, but was really difficult to debug and reason about. So when a few small sync issues occured, they took an extremely long time to debug. This PR is huge, which I regret. It involves replacing the "parent" relationship that records once had (pointing to the previous record) with a simple index (generally referred to as idx). This also means we had to change the recordindex, which referenced "tails". Tails were the last item in the chain. Now that we use an "array" vs linked list, that logic was also replaced. And is much simpler :D Same for the queries that act on this data. ---- This isn't final - we still need to add 1. Proper server/client error handling, which has been lacking for a while 2. The actual history implementation on top This exists in a branch, just without deletions. Won't be much to add that, I just don't want to make this any larger than it already is The _only_ caveat here is that we basically lose data synced via the old record store. This is the KV data from before. It hasn't been deleted or anything, just no longer hooked up. So it's totally possible to write a migration script. I just need to do that. * update .gitignore * use correct endpoint * fix for stores with length of 1 * use create/delete enum for history store * lint, remove unneeded host_id * remove prints * add command to import old history * add enable/disable switch for record sync * add record sync to auto sync * satisfy the almighty clippy * remove file that I did not mean to commit * feedback
* feat: add some metrics related to Atuin as an app (#1399)Ellie Huxtable2023-11-18
|
* support timezones in calendar (#1259)Conrad Ludgate2023-09-29
|
* better sync error messages (#1254)Conrad Ludgate2023-09-26
|
* replace chrono with time (#806)Conrad Ludgate2023-09-11
| | | | | | | | | * replace chrono with time * Fix test chrono usage --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* Run formatting (#1202)Ellie Huxtable2023-08-30
|
* Add total history count to the index API (#1102)Ellie Huxtable2023-07-14
| | | | Thought it would be fun to collect some cool stats, maybe put them on atuin.sh.
* Add new sync (#1093)Ellie Huxtable2023-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add record migration * Add database functions for inserting history No real tests yet :( I would like to avoid running postgres lol * Add index handler, use UUIDs not strings * Fix a bunch of tests, remove Option<Uuid> * Add tests, all passing * Working upload sync * Record downloading works * Sync download works * Don't waste requests * Use a page size for uploads, make it variable later * Aaaaaand they're encrypted now too * Add cek * Allow reading tail across hosts * Revert "Allow reading tail across hosts" Not like that This reverts commit 7b0c72e7e050c358172f9b53cbd21b9e44cf4931. * Handle multiple shards properly * format * Format and make clippy happy * use some fancy types (#1098) * use some fancy types * fmt * Goodbye horrible tuple * Update atuin-server-postgres/migrations/20230623070418_records.sql Co-authored-by: Conrad Ludgate <conradludgate@gmail.com> * fmt * Sort tests too because time sucks * fix features --------- Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
* refactor server to allow pluggable db and tracing (#1036)Conrad Ludgate2023-06-12
| | | | | | | | | * refactor server to allow pluggable db and tracing * clean up * fix descriptions * remove dependencies
* Allow server configured page size (#994)Ellie Huxtable2023-05-21
| | | | | | | * Allow server configured page size * Backwards compat via semver checks * Correct header name
* validate usernames on registration (#982)Conrad Ludgate2023-05-16
| | | | | improve login password incorrect error message update docs for registration with passwords
* feat: add delete account option (attempt 2) (#980)Yannick Ulrich2023-05-16
| | | | | | | | | | | | | | | * Added DELETE register endpoint * Added remove function to database * Added unregister to client * Updated docs * Renamed functions * Reformatting * Used execute instead of fetch in delete_user
* Patch bash history import regression (#970)Ellie Huxtable2023-05-10
| | | | | | | | * At least patch this on the server side so we don't loop forever * Postgres doesn't support <microsecond precision Use millis - almost everything should support them and they are still faster than a human can reasonably spam a button.
* chore: uuhhhhhh crypto lol (#805)Conrad Ludgate2023-04-17
| | | | | | | | | * chore: uuhhhhhh crypto lol * remove dead code * fix key decoding * use inplace encryption
* Add `atuin status` (#830)Ellie Huxtable2023-03-30
| | | | Useful for debugging, checking the state of things, and for if you forget your username!
* Account for user not yet having count cache (#812)Ellie Huxtable2023-03-26
| | | | | * Account for user not yet having count cache * Make clippy happy
* Add history deletion (#791)Ellie Huxtable2023-03-20
| | | | | | | | | | | | | * Drop events. I'd still like to do them, but differently * Start adding delete api stuff * Set mailmap * Delete delete delete * Fix tests * Make clippy happy
* Add register notification webhook (#764)Ellie Huxtable2023-03-07
| | | | I find it super motivating when people use my stuff, so this makes it _even easier_ to know when someone new signs up!
* fix registration (#740)Conrad Ludgate2023-02-28
|
* Add support for generic database in AppState (#711)Erwin Kroon2023-02-15
|
* axum6 with typesafe state (#674)Conrad Ludgate2023-02-10
|
* Add automatic update checking (#555)Ellie Huxtable2022-10-14
| | | | | | | | | | | | | | | | | | | | | | | | * Add automatic update checking * Add setting to opt out of update checks * Document options * no * no * also no * Make clippy happy * Update atuin-client/src/settings.rs Co-authored-by: Conrad Ludgate <conradludgate@gmail.com> * fix features Co-authored-by: Conrad Ludgate <conradludgate@gmail.com> Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* add some error messages (#510)Conrad Ludgate2022-10-07
| | | | | * add some error messages * fmt
* Show current version on server index (#436)Ellie Huxtable2022-06-06
|
* ignore JetBrains IDEs, tidy-up imports (#348)Jakub Panek2022-04-28
| | | | | | | * ignore JB IDEs * tidy-up imports * add rustfmt config
* Bump uuid from 0.8.2 to 1.0.0 (#311)dependabot[bot]2022-04-22
| | | | | | | | | | | | | | | | | | | | | * Bump uuid from 0.8.2 to 1.0.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.2 to 1.0.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.0.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * patch Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* refactor (#327)Conrad Ludgate2022-04-22
|
* tracing (#315)Conrad Ludgate2022-04-21
| | | | | | | * enable tracing on server * fmt * instrument handlers
* Use the count cache (#312)Ellie Huxtable2022-04-21
| | | | | | | | | | | * Use the count cache By default read from the count cache - if there is no value there, then do a full COUNT. The cache will be filled when the user posts up some more history * clean up server db error handling Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
* Initial implementation of calendar API (#298)Ellie Huxtable2022-04-13
| | | | | | | | | | | This can be used in the future for sync so that we can be more intelligent with what we're doing, and only sync up what's needed I'd like to eventually replace this with something more like a merkle tree, hence the hash field I've exposed, but that can come later Although this does include a much larger number of count queries, it should also be significantly more cache-able. I'll follow up with that later, and also follow up with using this for sync :)
* goodbye warp, hello axum (#296)Conrad Ludgate2022-04-12
|
* some changes :shrug: (#83)Conrad Ludgate2021-05-09
| | | | | * make everything a cow * fmt + clippy
* remove dyn Reply (#48)Conrad Ludgate2021-05-07
| | | | | | | | | | | * cleanup reply types * cleanup error api * small update * improve api some more * fmt
* Use cargo workspaces (#37)Ellie Huxtable2021-04-20
* Switch to Cargo workspaces Breaking things into "client", "server" and "common" makes managing the codebase much easier! client - anything running on a user's machine for adding history server - handles storing/syncing history and running a HTTP server common - request/response API definitions, common utils, etc * Update dockerfile