summaryrefslogtreecommitdiffstats
path: root/atuin-server-postgres
AgeCommit message (Collapse)Author
2024-02-12chore(release): prepare for release v18.0.1 (#1706)v18.0.1Ellie Huxtable
2024-02-09chore(release): prepare for release v18.0.0 (#1685)v18.0.0Ellie Huxtable
2024-02-02feat: add `store push --force`Ellie Huxtable
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 ```
2024-01-29feat: Add change-password command & support on server (#1615)TymanWasTaken
* Add change-password command & support on server * Add a test for password change * review: run format --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-01-26chore: use resolver 2, update editions + cargo (#1635)Ellie Huxtable
2024-01-08chore: schema cleanup (#1522)Ellie Huxtable
The columns referred to in this PR, were for some reason created with defaults. When created years ago, they were `bigserial` not `bigint`. The defaults were never actually used, as verified by 1. Checking the value of the sequences on the database 2. Checking the code So we're safe to clean them up.
2024-01-05feat: rework record sync for improved reliability (#1478)Ellie Huxtable
* 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
2024-01-03chore(release): prepare for release v17.2.1 (#1495)v17.2.1Ellie Huxtable
2024-01-03chore(release): prepare for release v17.2.0 (#1492)v17.2.0Ellie Huxtable
2023-12-10chore(release): prepare for release v17.1.0 (#1432)v17.1.0Ellie Huxtable
2023-10-28Release v17.0.1 (#1354)v17.0.1Ellie Huxtable
2023-10-25Prepare release v17.0.0 (#1327)Ellie Huxtable
2023-09-29support timezones in calendar (#1259)Conrad Ludgate
2023-09-28fix sync timestamps (#1258)Conrad Ludgate
* fix timestamp * add sync test * skip all sync tests
2023-09-11replace chrono with time (#806)Conrad Ludgate
* replace chrono with time * Fix test chrono usage --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2023-08-18Update dependencies (#1181)Conrad Ludgate
2023-08-09Fix index tail leak (#1159)Ellie Huxtable
2023-08-07Prepare release v16.0.0 (#1143)v16.0.0Ellie Huxtable
* Prepare release v16.0.0 * Remove debug output * Fix kv dupes if the store already exists * Add limit in frontend as well as sync backend
2023-07-14Delete the count cache row when a user is deleted (#1103)Ellie Huxtable
2023-07-14Add total history count to the index API (#1102)Ellie Huxtable
Thought it would be fun to collect some cool stats, maybe put them on atuin.sh.
2023-07-14Add new sync (#1093)Ellie Huxtable
* 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>
2023-06-12refactor server to allow pluggable db and tracing (#1036)Conrad Ludgate
* refactor server to allow pluggable db and tracing * clean up * fix descriptions * remove dependencies