Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ members = [

[workspace.package]
name = "atuin"
version = "15.0.0"
version = "16.0.0"
authors = ["Ellie Huxtable <[email protected]>"]
rust-version = "1.59"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion atuin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sync = [
]

[dependencies]
atuin-common = { path = "../atuin-common", version = "15.0.0" }
atuin-common = { path = "../atuin-common", version = "16.0.0" }

log = { workspace = true }
base64 = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions atuin-client/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ fn encode(h: &History) -> Result<Vec<u8>> {
encode::write_str(&mut output, &h.id)?;
encode::write_str(
&mut output,
&dbg!(h
.timestamp
&(h.timestamp
.to_rfc3339_opts(chrono::SecondsFormat::AutoSi, true)),
)?;
encode::write_sint(&mut output, h.duration)?;
Expand Down
8 changes: 8 additions & 0 deletions atuin-client/src/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::settings::Settings;

const KV_VERSION: &str = "v0";
const KV_TAG: &str = "kv";
const KV_VAL_MAX_LEN: usize = 100 * 1024;

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct KvRecord {
Expand Down Expand Up @@ -91,6 +92,13 @@ impl KvStore {
key: &str,
value: &str,
) -> Result<()> {
if value.len() > KV_VAL_MAX_LEN {
return Err(eyre!(
"kv value too large: max len {} bytes",
KV_VAL_MAX_LEN
));
}

let host_id = Settings::host_id().expect("failed to get host_id");

let record = KvRecord {
Expand Down
7 changes: 6 additions & 1 deletion atuin-client/src/record/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ async fn sync_upload(
// we need to iterate from the remote tail, and keep going until
// remote tail = current local tail

let mut record = Some(store.get(start).await.unwrap());
let mut record = if current_tail.is_some() {
let r = store.get(start).await.unwrap();
store.next(&r).await?
} else {
Some(store.get(start).await.unwrap())
};

let mut buf = Vec::with_capacity(upload_page_size);

Expand Down
2 changes: 1 addition & 1 deletion atuin-server-database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = { workspace = true }
repository = { workspace = true }

[dependencies]
atuin-common = { path = "../atuin-common", version = "15.0.0" }
atuin-common = { path = "../atuin-common", version = "16.0.0" }

tracing = "0.1"
chrono = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions atuin-server-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ homepage = { workspace = true }
repository = { workspace = true }

[dependencies]
atuin-common = { path = "../atuin-common", version = "15.0.0" }
atuin-server-database = { path = "../atuin-server-database", version = "15.0.0" }
atuin-common = { path = "../atuin-common", version = "16.0.0" }
atuin-server-database = { path = "../atuin-server-database", version = "16.0.0" }

tracing = "0.1"
chrono = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions atuin-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ homepage = { workspace = true }
repository = { workspace = true }

[dependencies]
atuin-common = { path = "../atuin-common", version = "15.0.0" }
atuin-server-database = { path = "../atuin-server-database", version = "15.0.0" }
atuin-common = { path = "../atuin-common", version = "16.0.0" }
atuin-server-database = { path = "../atuin-server-database", version = "16.0.0" }

tracing = "0.1"
chrono = { workspace = true }
Expand Down
8 changes: 4 additions & 4 deletions atuin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ sync = ["atuin-client/sync"]
server = ["atuin-server", "atuin-server-postgres", "tracing-subscriber"]

[dependencies]
atuin-server-postgres = { path = "../atuin-server-postgres", version = "15.0.0", optional = true }
atuin-server = { path = "../atuin-server", version = "15.0.0", optional = true }
atuin-client = { path = "../atuin-client", version = "15.0.0", optional = true, default-features = false }
atuin-common = { path = "../atuin-common", version = "15.0.0" }
atuin-server-postgres = { path = "../atuin-server-postgres", version = "16.0.0", optional = true }
atuin-server = { path = "../atuin-server", version = "16.0.0", optional = true }
atuin-client = { path = "../atuin-client", version = "16.0.0", optional = true, default-features = false }
atuin-common = { path = "../atuin-common", version = "16.0.0" }

log = { workspace = true }
env_logger = "0.10.0"
Expand Down