Skip to content

Commit

Permalink
Update rust deps (#2130)
Browse files Browse the repository at this point in the history
* Update rust deps

* Reduce logging level in replication

* Bundle protoc
  • Loading branch information
javitonino authored May 9, 2024
1 parent 28c6b10 commit e27193b
Show file tree
Hide file tree
Showing 23 changed files with 4,027 additions and 2,128 deletions.
1,257 changes: 369 additions & 888 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions nucliadb_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ edition = "2021"
anyhow = { version = "1", features = ["backtrace"] }
prometheus-client = "0.20.0"
tracing = "0.1.29"
prost-types = "0.10"
prost = "0.10"
prost-types = "0.12"
prost = "0.12"
rayon = "1.5.1"
nucliadb_protos = { path = "../nucliadb_protos/rust" }
fs2 = "0.4.3"
Expand All @@ -20,7 +20,7 @@ tempfile = "3"
serde = { version = "1.0", features = ["derive"] }
lazy_static = "1.4.0"
futures = "0.3.17"
tonic = "0.7"
tonic = "0.11"
hyper = "0.14.26"
tower = "0.4.13"
tokio = "1.32.0"
Expand Down
35 changes: 18 additions & 17 deletions nucliadb_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ name = "node_writer"
path = "src/bin/writer.rs"

[dependencies]
axum = "0.6.15"
axum-server = "0.4.7"
axum = "0.6"
axum-server = "0.5"

tonic = "0.7"
tonic-health = "0.6"
tonic = "0.11"
tonic-health = "0.11"
futures-core = "0.3.17"
futures-util = "0.3.17"
futures = "0.3.17"
Expand All @@ -44,18 +44,18 @@ uuid = { version = "1.1", features = ["serde", "v4"] }
bincode = "1.3.3"
async-trait = "0.1.51"
time = "0.3.3"
itertools = "0.10"
itertools = "0.12"
anyhow = { version = "1", features = ["backtrace"] }
http = "0.2"
hyper = "0.14.26"
tower = "0.4.13"
thiserror = "1"
opentelemetry = { version = "0.17", features = ["rt-tokio", "trace"] }
tracing-opentelemetry = "0.17.2"
reqwest = { version = "0.11.16", features = ["json", "rustls-tls", "blocking"] }
opentelemetry = { version = "0.22", features = ["trace"] }
tracing-opentelemetry = "0.23"
reqwest = { version = "0.11", features = ["json", "rustls-tls", "blocking"] }
num_cpus = "1.16.0"
crossbeam-utils = "0.8.16"
object_store = { version = "0.10.0", features = ["gcp", "aws"]}
object_store = { version = "0.9.1", features = ["gcp", "aws"]}
base64 = "^0.21"


Expand All @@ -75,17 +75,17 @@ nucliadb_relations2 = { path = "../nucliadb_relations2" }
nucliadb_protos = { path = "../nucliadb_protos/rust" }

# sentry sdk
sentry = "0.26.0"
opentelemetry-jaeger = { version = "0.16.0", features = ["rt-tokio"] }
sentry = "0.31.8"
opentelemetry-jaeger = { version = "0.21", features = ["rt-tokio"] }
tracing-subscriber = { version = "0.3.11", features = [
"env-filter",
"registry",
"std",
"json",
] }
tracing-log = { version = "0.1.3", features = ["env_logger"] }
opentelemetry-zipkin = "0.15.0"
sentry-tracing = "0.27.0"
tracing-log = "0.2"
opentelemetry-zipkin = "0.20.0"
sentry-tracing = "0.31"
tracing-core = "0.1.31"

filetime = "0.2"
Expand All @@ -100,10 +100,11 @@ lazy_static = "1.4.0"
lru = "0.12.1"
sysinfo = { version = "0.30.5", default-features = false }
envy = "0.4.2"
opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"] }


[build-dependencies]
tonic-build = "0.7.0"
tonic-build = "0.11.0"

[features]
ci-test = []
Expand All @@ -125,7 +126,7 @@ tokio = { version = "1.12.0", features = [
] }


tracing-log = { version = "0.1.3", features = ["env_logger"] }
tracing-log = "0.2"
tracing-subscriber = { version = "0.3.11", features = [
"env-filter",
"registry",
Expand All @@ -137,4 +138,4 @@ tempfile = "3.2.0"
regex = "1.5.5"
openssl = { version = "0.10.57", features = ["vendored"] }

rstest = "0.18.2"
rstest = "0.18.2"
2 changes: 1 addition & 1 deletion nucliadb_node/src/replication/replicator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub async fn connect_to_primary_and_replicate(
);
let shard_cache_clone = Arc::clone(&shard_cache);

warn!("Creating shard to replicate: {shard_id}");
info!("Creating shard to replicate: {shard_id}");
let shard_create = tokio::task::spawn_blocking(move || shard_cache_clone.create(metadata)).await?;
if shard_create.is_err() {
warn!("Failed to create shard: {:?}", shard_create);
Expand Down
7 changes: 4 additions & 3 deletions nucliadb_node/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,12 @@ fn jaeger_layer(settings: &Settings) -> NodeResult<Box<dyn Layer<Registry> + Sen
global::set_text_map_propagator(opentelemetry_zipkin::Propagator::new());

let agent_endpoint = settings.jaeger_agent_address();
let tracer = opentelemetry_jaeger::new_pipeline()
.with_agent_endpoint(agent_endpoint)
#[allow(deprecated)]
let tracer = opentelemetry_jaeger::new_agent_pipeline()
.with_endpoint(agent_endpoint)
.with_service_name("nucliadb_node")
.with_auto_split_batch(true)
.install_batch(opentelemetry::runtime::Tokio)?;
.install_batch(opentelemetry_sdk::runtime::Tokio)?;

// To avoid sending too much information to Jaeger, we filter out all events
// (as they are logged to stdout), spans from external instrumented crates
Expand Down
5 changes: 2 additions & 3 deletions nucliadb_node_binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1", features = ["full"] }
log = "0.4"
bincode = "1.3.3"
cargo-llvm-cov = "0.5.24"

openssl = { version = "0.10.57", features = ["vendored"] }
prost = "0.10"
prost-types = "0.10"
prost = "0.12"
prost-types = "0.12"
tracing = { version = "0.1.29" }
tracing-subscriber = { version = "0.3.11", features = [
"env-filter",
Expand Down
2 changes: 1 addition & 1 deletion nucliadb_node_binding/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl NodeWriter {

let request = NewShardRequest::decode(&mut Cursor::new(metadata)).expect("Error decoding arguments");
let shard_id = uuid::Uuid::new_v4().to_string();
let similarity = VectorSimilarity::from_i32(request.similarity).unwrap();
let similarity = VectorSimilarity::try_from(request.similarity).unwrap();
let metadata = ShardMetadata::new(
self.shards_path.join(shard_id.clone()),
shard_id,
Expand Down
4 changes: 2 additions & 2 deletions nucliadb_paragraphs2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ levenshtein_automata = "0.2.1"
once_cell = "1.13.1"
tantivy-fst = "0.3.0"
tantivy-common = "0.2.0"
itertools = "0.10.5"
itertools = "0.12"

serde_json = "1.0.86"

Expand All @@ -23,4 +23,4 @@ nucliadb_procs = { path = "../nucliadb_procs" }

[build-dependencies]
serde_json = "1.0.86"
itertools = "0.10.5"
itertools = "0.12"
4 changes: 2 additions & 2 deletions nucliadb_paragraphs3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ levenshtein_automata = "0.2.1"
once_cell = "1.13.1"
tantivy-fst = "0.3.0"
tantivy-common = "0.2.0"
itertools = "0.10.5"
itertools = "0.12"

serde_json = "1.0.86"

Expand All @@ -23,4 +23,4 @@ nucliadb_procs = { path = "../nucliadb_procs" }

[build-dependencies]
serde_json = "1.0.86"
itertools = "0.10.5"
itertools = "0.12"
11 changes: 6 additions & 5 deletions nucliadb_protos/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ homepage = "https://nuclia.com/"
documentation = "https://nuclia.com"

[build-dependencies]
tonic-build = "0.7.0"
prost-build = "0.10"
tonic-build = "0.11.0"
prost-build = "0.12"
protobuf-src = "1.1.0"

[dependencies]
tonic = "0.7"
prost-types = "0.10"
prost = { version = "0.10"}
tonic = "0.11"
prost-types = "0.12"
prost = "0.12"
2 changes: 2 additions & 0 deletions nucliadb_protos/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
use std::io::Result;

fn main() -> Result<()> {
std::env::set_var("PROTOC", protobuf_src::protoc());

println!("cargo:rerun-if-changed=../knowledgebox.proto");
println!("cargo:rerun-if-changed=../resources.proto");
println!("cargo:rerun-if-changed=../noderesources.proto");
Expand Down
Loading

3 comments on commit e27193b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e27193b Previous: 1a9ce6c Ratio
nucliadb/search/tests/unit/search/test_fetch.py::test_highligh_error 13088.473054273269 iter/sec (stddev: 0.0000024885966195853213) 13339.058637295573 iter/sec (stddev: 1.296413027597777e-7) 1.02

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e27193b Previous: 1a9ce6c Ratio
nucliadb/search/tests/unit/search/test_fetch.py::test_highligh_error 13185.994558735043 iter/sec (stddev: 8.770887522572189e-7) 13339.058637295573 iter/sec (stddev: 1.296413027597777e-7) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: e27193b Previous: 1a9ce6c Ratio
nucliadb/search/tests/unit/search/test_fetch.py::test_highligh_error 13215.387654215743 iter/sec (stddev: 3.533252849310065e-7) 13339.058637295573 iter/sec (stddev: 1.296413027597777e-7) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.