Skip to content

Commit

Permalink
Update redis-protocol and other crates (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored Dec 3, 2024
1 parent ad8bc50 commit 21a0ff7
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 366 deletions.
690 changes: 338 additions & 352 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rcgen = "0.13.0"
subprocess = "0.2.7"
chacha20poly1305 = { version = "0.10.0", features = ["std"] }
csv = "1.2.0"
redis-protocol = { version = "5.0.0", features = ["bytes"] }
redis-protocol = { version = "6.0.0", features = ["bytes"] }
bincode = "1.3.1"
futures = "0.3"
hex = "0.4.3"
Expand Down
2 changes: 1 addition & 1 deletion ec2-cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ tracing-subscriber.workspace = true
aws-throwaway.workspace = true
tracing-appender.workspace = true
shellfish = { version = "0.10.0", features = ["async"] }
cargo_metadata = "0.18.0"
cargo_metadata = "0.19.0"
shell-quote.workspace = true
2 changes: 1 addition & 1 deletion shotover-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rand.workspace = true
async-trait.workspace = true
tracing-subscriber.workspace = true
tracing-appender.workspace = true
fred = { version = "9.0.3", features = ["enable-rustls-ring"] }
fred = { version = "10.0.0", features = ["enable-rustls-ring"] }
tokio-bin-process.workspace = true
rustls-pemfile = "2.0.0"
rustls-pki-types = "1.1.0"
Expand Down
6 changes: 3 additions & 3 deletions shotover-proxy/benches/windsock/valkey/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl Bench for ValkeyBench {
// only one string field so we just directly store the value in resources
let address = resources;

let mut config = RedisConfig::from_url(address).unwrap();
let mut config = Config::from_url(address).unwrap();
if let Encryption::Tls = self.encryption {
let private_key =
load_private_key("tests/test-configs/valkey/tls/certs/localhost.key").unwrap();
Expand All @@ -372,7 +372,7 @@ impl Bench for ValkeyBench {
.into(),
);
}
let client = Arc::new(RedisClient::new(config, None, None, None));
let client = Arc::new(Client::new(config, None, None, None));

// connect to the server, returning a handle to the task that drives the connection
let shutdown_handle = client.connect();
Expand Down Expand Up @@ -444,7 +444,7 @@ fn load_ca(path: &str) -> Result<RootCertStore> {

#[derive(Clone)]
struct BenchTaskValkey {
client: Arc<RedisClient>,
client: Arc<Client>,
operation: ValkeyOperation,
}

Expand Down
4 changes: 2 additions & 2 deletions shotover-proxy/tests/valkey_int_tests/basic_driver_tests.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::valkey_int_tests::assert::*;
use crate::CONNECTION_REFUSED_OS_ERROR;
use bytes::BytesMut;
use fred::clients::RedisClient;
use fred::clients::Client;
use fred::interfaces::ClientLike;
use futures::{Future, StreamExt};
use pretty_assertions::assert_eq;
Expand Down Expand Up @@ -1283,7 +1283,7 @@ pub async fn test_dr_auth() {
/// at least one driver handles this as we expect.
/// Fred is used here as redis-rs sends an unconfigurable `CLIENT SETINFO` command and ignores the result on connection init.
/// This results in the error message being completely dropped with redis-rs.
pub async fn test_trigger_transform_failure_driver(client: &RedisClient) {
pub async fn test_trigger_transform_failure_driver(client: &Client) {
assert_eq!(
// fred sends a `CLIENT` command on startup to which shotover will reply with an error
client.wait_for_connect().await.unwrap_err().details(),
Expand Down
6 changes: 3 additions & 3 deletions shotover-proxy/tests/valkey_int_tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::{shotover_process, CONNECTION_REFUSED_OS_ERROR};
use basic_driver_tests::*;
use fred::clients::RedisClient;
use fred::clients::Client;
use fred::interfaces::ClientLike;
use fred::types::RedisConfig;
use fred::prelude::Config;
use pretty_assertions::assert_eq;
use redis::aio::Connection;
use redis::Commands;
Expand Down Expand Up @@ -54,7 +54,7 @@ async fn passthrough_valkey_down() {
let shotover = shotover_process("tests/test-configs/valkey/passthrough/topology.yaml")
.start()
.await;
let client = RedisClient::new(RedisConfig::default(), None, None, None);
let client = Client::new(Config::default(), None, None, None);

{
let _shutdown_handle = client.connect();
Expand Down
4 changes: 2 additions & 2 deletions shotover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ axum = { version = "0.7", default-features = false, features = ["tokio", "tracin
pretty-hex = "0.4.0"
tokio-stream = "0.1.2"
derivative = "2.1.1"
cached = { version = "0.53", features = ["async"], optional = true }
cached = { version = "0.54", features = ["async"], optional = true }
governor = { version = "0.7", default-features = false, features = ["std", "jitter", "quanta"] }
nonzero_ext = "0.3.0"
version-compare = { version = "0.2", optional = true }
Expand All @@ -79,7 +79,7 @@ typetag.workspace = true
tokio-tungstenite = "0.24.0"

# Error handling
thiserror = "1.0"
thiserror = "2.0"
anyhow.workspace = true
backtrace = "0.3.66"
backtrace-ext = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion shotover/src/codec/valkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ impl Encoder<Messages> for ValkeyEncoder {
}
Encodable::Frame(frame) => {
let item = frame.into_valkey().unwrap();
extend_encode(dst, &item)
extend_encode(dst, &item, false)
.map(|_| ())
.map_err(|e| anyhow!("Valkey encoding error: {} - {:#?}", e, item))
}
Expand Down

0 comments on commit 21a0ff7

Please sign in to comment.