From 1dbf40ee2c204676506c1d09e38572a62fd19687 Mon Sep 17 00:00:00 2001 From: Folke Behrens Date: Fri, 28 Mar 2025 11:43:52 +0000 Subject: [PATCH] proxy: Update redis crate (#11372) --- Cargo.lock | 33 +++++++++---------- Cargo.toml | 6 ++-- .../connection_with_credentials_provider.rs | 2 ++ workspace_hack/Cargo.toml | 4 +-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d8c276bc1..f60bfaafe5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -148,9 +148,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "archery" @@ -3861,11 +3861,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -3914,11 +3913,10 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] @@ -3947,9 +3945,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -5362,26 +5360,25 @@ dependencies = [ [[package]] name = "redis" -version = "0.25.2" +version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d64e978fd98a0e6b105d066ba4889a7301fca65aeac850a877d8797343feeb" +checksum = "b110459d6e323b7cda23980c46c77157601199c9da6241552b284cd565a7a133" dependencies = [ - "async-trait", + "arc-swap", "bytes", "combine", "futures-util", "itoa", + "num-bigint", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", - "rustls-native-certs 0.7.0", - "rustls-pemfile 2.1.1", - "rustls-pki-types", + "rustls 0.23.18", + "rustls-native-certs 0.8.0", "ryu", "sha1_smol", "socket2", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-util", "url", ] diff --git a/Cargo.toml b/Cargo.toml index 9bbc5a1a38..3fb9229da8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ license = "Apache-2.0" [workspace.dependencies] ahash = "0.8" anyhow = { version = "1.0", features = ["backtrace"] } -arc-swap = "1.6" +arc-swap = "1.7" async-compression = { version = "0.4.0", features = ["tokio", "gzip", "zstd"] } atomic-take = "1.1.0" flate2 = "1.0.26" @@ -130,7 +130,7 @@ nix = { version = "0.27", features = ["dir", "fs", "process", "socket", "signal" # on compute startup metrics (start_postgres_ms), >= 25% degradation. notify = "6.0.0" num_cpus = "1.15" -num-traits = "0.2.15" +num-traits = "0.2.19" once_cell = "1.13" opentelemetry = "0.27" opentelemetry_sdk = "0.27" @@ -146,7 +146,7 @@ procfs = "0.16" prometheus = {version = "0.13", default-features=false, features = ["process"]} # removes protobuf dependency prost = "0.13" rand = "0.8" -redis = { version = "0.25.2", features = ["tokio-rustls-comp", "keep-alive"] } +redis = { version = "0.29.2", features = ["tokio-rustls-comp", "keep-alive"] } regex = "1.10.2" reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] } reqwest-tracing = { version = "0.5", features = ["opentelemetry_0_27"] } diff --git a/proxy/src/redis/connection_with_credentials_provider.rs b/proxy/src/redis/connection_with_credentials_provider.rs index b5c3d13216..fe656557ac 100644 --- a/proxy/src/redis/connection_with_credentials_provider.rs +++ b/proxy/src/redis/connection_with_credentials_provider.rs @@ -143,6 +143,8 @@ impl ConnectionWithCredentialsProvider { db: 0, username: Some(username), password: Some(password.clone()), + // TODO: switch to RESP3 after testing new client version. + protocol: redis::ProtocolVersion::RESP2, }, }) } diff --git a/workspace_hack/Cargo.toml b/workspace_hack/Cargo.toml index e9eaf4b35e..b548a2a88a 100644 --- a/workspace_hack/Cargo.toml +++ b/workspace_hack/Cargo.toml @@ -61,7 +61,7 @@ memchr = { version = "2" } nix = { version = "0.26" } nom = { version = "7" } num = { version = "0.4" } -num-bigint = { version = "0.4", default-features = false, features = ["std"] } +num-bigint = { version = "0.4" } num-complex = { version = "0.4", default-features = false, features = ["std"] } num-integer = { version = "0.1", features = ["i128"] } num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] } @@ -127,7 +127,7 @@ log = { version = "0.4", default-features = false, features = ["std"] } memchr = { version = "2" } nom = { version = "7" } num = { version = "0.4" } -num-bigint = { version = "0.4", default-features = false, features = ["std"] } +num-bigint = { version = "0.4" } num-complex = { version = "0.4", default-features = false, features = ["std"] } num-integer = { version = "0.1", features = ["i128"] } num-iter = { version = "0.1", default-features = false, features = ["i128", "std"] }