aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-server/src (unfollow)
Commit message (Collapse)Author
2024-04-18chore: move crates into crates/ dir (#1958)Ellie Huxtable
I'd like to tidy up the root a little, and it's nice to have all the rust crates in one place
2024-04-16feat(server): add me endpoint (#1954)Ellie Huxtable
2024-04-05chore(ci): Add codespell support (config, workflow) and make it fix some ↵Yaroslav Halchenko
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 ^^^
2024-03-05fix(sync): record size limiter (#1827)Ellie Huxtable
Settings the record size limit to 0 had issues. Inverting the condition works better.
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-28chore(deps): update axum (#1637)Conrad Ludgate
2024-01-23feat: add registered and deleted metrics (#1622)Ellie Huxtable
2024-01-17feat: add metrics counter for records downloaded (#1584)Ellie Huxtable
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: remove the teapot response (#1496)Ellie Huxtable
It was fun, but it wasn't as informative as it needs to be I'm leaving the function name though :)
2024-01-03fix(server): typo with default config (#1493)Ellie Huxtable
Without TLS config, the server fails to load defaults. Until this is released, add this to your server config ``` [tls] enable = false cert_path = "" pkey_path = "" ```
2023-12-27feat: Add TLS to atuin-server (#1457)Eric Hodel
* Add TLS to atuin-server atuin as a project already includes most of the dependencies necessary for server-side TLS. This allows `atuin server start` to use a TLS certificate when self-hosting in order to avoid the complication of wrapping it in a TLS-aware proxy server. Configuration is handled similar to the metrics server with its own struct and currently accepts only the private key and certificate file paths. Starting a TLS server and a TCP server are divergent because the tests need to bind to an arbitrary port to avoid collisions across tests. The API to accomplish this for a TLS server is much more verbose. * Fix clippy, fmt * Add TLS section to self-hosting
2023-12-20feat: add semver checking to client requests (#1456)Ellie Huxtable
* 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
2023-11-18feat: add some metrics related to Atuin as an app (#1399)Ellie Huxtable
2023-11-16feat: add metrics server and http metrics (#1394)Ellie Huxtable
* feat: add metrics server and http metrics * setup metrics * update default config * fix tests
2023-10-28Add Kris Nova to X-Clacks-Overhead (#1355)Ellie Huxtable
Rest in peace 😔 https://nivenly.org/memorials/krisnova/
2023-10-21allow binding server to hostname (#1318)Conrad Ludgate
2023-10-12Add commands to print the default configuration (#1241)Tobias Genannt
* Add commands to print the default configuration When updating a software I often want to compare my configuration with the configuration of the new version. To make this possible atuin can now print the default configuration. This also updates the example files with the actual values used as default in the settings.rs files. * Changed command name to 'default-config' * Fixed merge
2023-10-03A man is not dead while his name is still spoken (#1280)Chris Rose
2023-09-29support timezones in calendar (#1259)Conrad Ludgate
2023-09-26better sync error messages (#1254)Conrad Ludgate
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-30Run formatting (#1202)Ellie Huxtable
2023-07-31fix(server): Teapot is a cup of coffee (#1137)LeoniePhiline
2023-07-27some simple server tests (#1096)Conrad Ludgate
* some simple server tests * fmt * logging in server test * log server errors * fix postgres uri * postgres ports * localhost again? * Rebase fixes --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
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-19fix: fixes unix specific impl of shutdown_signal (#1061)YummyOreo
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
2023-05-30Add graceful shutdown on SIGTERM (#1014)Marijan Smetko
* Add graceful shutdown on SIGTERM * Fix linter
2023-05-21Allow server configured page size (#994)Ellie Huxtable
* Allow server configured page size * Backwards compat via semver checks * Correct header name
2023-05-16validate usernames on registration (#982)Conrad Ludgate
improve login password incorrect error message update docs for registration with passwords
2023-05-16feat: add delete account option (attempt 2) (#980)Yannick Ulrich
* 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
2023-05-10Patch bash history import regression (#970)Ellie Huxtable
* 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.
2023-04-17chore: uuhhhhhh crypto lol (#805)Conrad Ludgate
* chore: uuhhhhhh crypto lol * remove dead code * fix key decoding * use inplace encryption
2023-03-30Add `atuin status` (#830)Ellie Huxtable
Useful for debugging, checking the state of things, and for if you forget your username!
2023-03-26Account for user not yet having count cache (#812)Ellie Huxtable
* Account for user not yet having count cache * Make clippy happy
2023-03-20Add history deletion (#791)Ellie Huxtable
* 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
2023-03-07Add register notification webhook (#764)Ellie Huxtable
I find it super motivating when people use my stuff, so this makes it _even easier_ to know when someone new signs up!
2023-02-28fix registration (#740)Conrad Ludgate
2023-02-15Add support for generic database in AppState (#711)Erwin Kroon
2023-02-10axum6 with typesafe state (#674)Conrad Ludgate
2022-10-14Add automatic update checking (#555)Ellie Huxtable
* 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>
2022-10-07add some error messages (#510)Conrad Ludgate
* add some error messages * fmt
2022-07-26Add support for prepending a path to all routes for the server (#484)morguldir
* Add support for prepending a path to all routes * Don't nest if there is no path provided Co-authored-by: Conrad Ludgate <oon@conradludgate.com> * Change the default for the path variable * run cargo-fmt Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
2022-06-10Add configurable history length (#447)Ellie Huxtable
* Add configurable history length This allows servers to decide the max length of each history item they want to store! Some users might have much larger history lines than others. This setting can be set to 0 to allow for unlimited history length. This is not recommended for a public server install, but for a private one it can work nicely. * Format lol
2022-06-06Show current version on server index (#436)Ellie Huxtable
2022-05-13Don't create config dir for server in default location if not needed (#406)Jakub Jirutka
...respect ATUIN_CONFIG_DIR. The current behaviour is problematic when running atuin server as a system service with config dir in /etc/atuin.
2022-04-28ignore JetBrains IDEs, tidy-up imports (#348)Jakub Panek
* ignore JB IDEs * tidy-up imports * add rustfmt config