diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-12-20 09:03:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 09:03:04 +0000 |
commit | 86f50e0356e4b661be43c2aeba97a67d83910095 (patch) | |
tree | 3c836616132ab23e60231af21b668d639dbabe97 /Cargo.lock | |
parent | 42ac150fe34ee291e3228177a81f9cb1f572c741 (diff) |
feat: add semver checking to client requests (#1456)
* 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
Diffstat (limited to 'Cargo.lock')
-rw-r--r-- | Cargo.lock | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock index d36051058..f84e25c1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -249,8 +249,10 @@ name = "atuin-common" version = "17.1.0" dependencies = [ "eyre", + "lazy_static", "pretty_assertions", "rand", + "semver", "serde", "sqlx", "time", |