aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src/api_client.rs (follow)
Commit message (Collapse)AuthorAge
* fix: report non-decodable errors correctly (#1915)Ellie Huxtable2024-04-02
|
* fix(build): make atuin compile on non-win/mac/linux platforms (#1825)Rain2024-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi! I've been trying to get atuin set up on the illumos machine I built for work @oxidecomputer, and I ran into a few issues which are fixed here: 1. The `clipboard` feature was only supported on Windows, Mac and Linux. I've added a platform gate for that. 2. The `atomic-write-file` crate needed an update to the version of `nix` -- that is included. 3. As part of this, I found a [security bug](https://rustsec.org/advisories/RUSTSEC-2024-0020.html) in the whoami crate. The bug has been fixed upstream and I've included it. whoami 1.5.0 deprecates the `hostname` function, which produced some fresh warnings. While fixing the warnings I also took the liberty of doing some code rearrangement, adding a few functions that wrap some common operations. I didn't really know where to put those functions, so I created a new `utils` module for it. If you have a better place to put them, I'm happy to change the PR. Feel free to make any changes to this PR if you like before landing it, or to ask for review. As a followup I'm also happy to set up a cross-compile build for atuin on illumos. It's a bit harder to run tests in CI for illumos at the moment, but I'm trying to get a project started up to make that happen in the future as well.
* 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: add feature to allow always disable check update (#1628)Mag Mell2024-01-26
| | | | | | | | | | | | | * chore: add feature to allow always disable check update In the packaging rules of some distributions, the software's self-update check needs to be permanently turned off This commit will make it easier for these users to * fix: formatting --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* feat: make deleting from the UI work with record store sync (#1580)Ellie Huxtable2024-01-17
| | | | | | | * feat: make deleting from the UI work with record store sync * sort cli delete too * teeny bit more logs
* feat: add better error handling for sync (#1572)Ellie Huxtable2024-01-15
| | | | Hopefully this helps users get more descriptive errors, and give more descriptive bug reports
* refactor: String -> HistoryId (#1512)Ellie Huxtable2024-01-06
|
* 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 semver checking to client requests (#1456)Ellie Huxtable2023-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add semver checking to client requests This enforces that the client and the server run the same major version in order to sync successfully. We're using the `Atuin-Version` http header to transfer this information If the user is not on the same MAJOR, then they will see an error like this > Atuin version mismatch! In order to successfully sync, the client and the server must run the same *major* version > Client: 17.1.0 > Server: 18.1.0 > Error: could not sync records due to version mismatch This change means two things 1. We will now only increment major versions if there is a breaking change for sync 2. We can now add breaking changes to sync, for any version >17.1.0. Clients will fail in a meaningful way. * lint, fmt, etc * only check for client newer than server * Add version header to client too
* fix sync timestamps (#1258)Conrad Ludgate2023-09-28
| | | | | | | * fix timestamp * add sync test * skip all sync tests
* better sync error messages (#1254)Conrad Ludgate2023-09-26
|
* Add connect timeout and overall timeout (#1238)Ellie Huxtable2023-09-18
| | | | | | | | | * Add connect timeout and overall timeout * Make it configurable * Fix test * Add docs
* 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>
* 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>
* remove decryption from api-client (#1063)Conrad Ludgate2023-06-21
|
* add support to override hostname and username via env var (#1041)Peter Brunner2023-06-12
|
* Restructure account commands to account subcommand (#984)Ellie Huxtable2023-05-17
| | | | | | | | | | | | | | | | | | | * Stop running triggers on history delete * Move to account management dir * Alter trigger function to only run for inserts * wip * Add atuin account subcommands, and re-org delete * Clarify docs * Delete silly dupe migration * Um where did this come from * Oops, insert only plz
* 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
* chore: uuhhhhhh crypto lol (#805)Conrad Ludgate2023-04-17
| | | | | | | | | * chore: uuhhhhhh crypto lol * remove dead code * fix key decoding * use inplace encryption
* 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
* Try to make clippy happy 🥺 (#686)Ellie Huxtable2023-02-06
| | | | | | | * Try to make clippy happy 🥺 * Fmt * I missed one (can't run clippy locally on airport wifi...)
* 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
* ignore JetBrains IDEs, tidy-up imports (#348)Jakub Panek2022-04-28
| | | | | | | * ignore JB IDEs * tidy-up imports * add rustfmt config
* history list (#340)Conrad Ludgate2022-04-25
|
* feature-flags (#328)Conrad Ludgate2022-04-22
| | | | | | | | | | | | | * use feature flags * fmt * fix features * update ci * fmt Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
* A few minor tweaks (#314)Conrad Ludgate2022-04-21
| | | | | | | | | * use bail macro replace client database errors remove dead code * fix test
* goodbye warp, hello axum (#296)Conrad Ludgate2022-04-12
|
* feat: login/register no longer blocking (#216)Conrad Ludgate2021-12-08
|
* Fix sync (#95)Ellie Huxtable2021-05-09
| | | | | | | The data part of the add history request is actually a string. I don't want to introduce any structure here, and would rather keep it as "just a blob". Even if that blob has structure secretly! My fault for missing this in the last review
* some changes :shrug: (#83)Conrad Ludgate2021-05-09
| | | | | * make everything a cow * fmt + clippy
* Bugfixes, show time ago, perf improvementsEllie Huxtable2021-04-21
| | | | Also allow unique listing and more ergonomic cwd usage
* 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