diff --git a/.cargo/config.toml b/.cargo/config.toml index 03ce78a2d..7eba8cee5 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,16 +9,16 @@ linker = "aarch64-linux-gnu-gcc" [alias] # Can run every benchmark -windsock = "test --release --bench windsock --features kafka,alpha-transforms,kafka-cpp-driver-tests,cassandra,redis --" -windsock-debug = "test --bench windsock --features kafka,alpha-transforms,kafka-cpp-driver-tests,cassandra,redis --" +windsock = "test --release --bench windsock --features kafka,alpha-transforms,kafka-cpp-driver-tests,cassandra,valkey --" +windsock-debug = "test --bench windsock --features kafka,alpha-transforms,kafka-cpp-driver-tests,cassandra,valkey --" # Can only run benchmarks specific to the protocol but compiles a lot faster -windsock-valkey = "test --release --bench windsock --no-default-features --features redis,alpha-transforms --" +windsock-valkey = "test --release --bench windsock --no-default-features --features valkey,alpha-transforms --" windsock-kafka = "test --release --bench windsock --no-default-features --features kafka,alpha-transforms,kafka-cpp-driver-tests --" windsock-cassandra = "test --release --bench windsock --no-default-features --features cassandra,alpha-transforms --" # Compile benches in docker to ensure compiled libc version is compatible with the EC2 instances libc -windsock-cloud-docker = "run --package windsock-cloud-docker -- redis,cassandra,kafka" -windsock-cloud-docker-valkey = "run --package windsock-cloud-docker -- redis" +windsock-cloud-docker = "run --package windsock-cloud-docker -- valkey,cassandra,kafka" +windsock-cloud-docker-valkey = "run --package windsock-cloud-docker -- valkey" windsock-cloud-docker-kafka = "run --package windsock-cloud-docker -- kafka" windsock-cloud-docker-cassandra = "run --package windsock-cloud-docker -- cassandra" diff --git a/custom-transforms-example/Cargo.toml b/custom-transforms-example/Cargo.toml index 681772d1c..ff167c541 100644 --- a/custom-transforms-example/Cargo.toml +++ b/custom-transforms-example/Cargo.toml @@ -23,9 +23,9 @@ redis.workspace = true pretty_assertions.workspace = true [features] -redis = ["shotover/redis"] -default = ["redis"] +valkey = ["shotover/valkey"] +default = ["valkey"] [[test]] name = "test" -required-features = ["redis"] +required-features = ["valkey"] diff --git a/custom-transforms-example/src/main.rs b/custom-transforms-example/src/main.rs index af3de435e..4a6007392 100644 --- a/custom-transforms-example/src/main.rs +++ b/custom-transforms-example/src/main.rs @@ -1,8 +1,8 @@ use shotover::runner::Shotover; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod valkey_get_rewrite; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] shotover::import_transform!(valkey_get_rewrite::ValkeyGetRewriteConfig); fn main() { diff --git a/shotover-proxy/Cargo.toml b/shotover-proxy/Cargo.toml index 14f807324..ca1c74cc0 100644 --- a/shotover-proxy/Cargo.toml +++ b/shotover-proxy/Cargo.toml @@ -55,11 +55,11 @@ pretty_assertions.workspace = true alpha-transforms = ["shotover/alpha-transforms"] cassandra = ["shotover/cassandra"] kafka = ["shotover/kafka"] -redis = ["shotover/redis"] +valkey = ["shotover/valkey"] opensearch = ["shotover/opensearch"] cassandra-cpp-driver-tests = ["test-helpers/cassandra-cpp-driver-tests"] kafka-cpp-driver-tests = ["test-helpers/kafka-cpp-driver-tests"] -default = ["cassandra", "kafka", "redis", "opensearch"] +default = ["cassandra", "kafka", "valkey", "opensearch"] [[bench]] name = "windsock" diff --git a/shotover-proxy/benches/windsock/main.rs b/shotover-proxy/benches/windsock/main.rs index c93ce8d8b..76ca0eab5 100644 --- a/shotover-proxy/benches/windsock/main.rs +++ b/shotover-proxy/benches/windsock/main.rs @@ -2,7 +2,7 @@ #![cfg_attr( any( not(feature = "cassandra"), - not(feature = "redis"), + not(feature = "valkey"), not(all(feature = "kafka-cpp-driver-tests", feature = "kafka")) ), allow(dead_code, unused_imports, unused_variables, unused_mut) @@ -16,7 +16,7 @@ mod common; mod kafka; mod profilers; mod shotover; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod valkey; use cloud::CloudResources; @@ -54,7 +54,7 @@ fn main() { benches.extend(cassandra::benches()); #[cfg(all(feature = "kafka-cpp-driver-tests", feature = "kafka"))] benches.extend(kafka::benches()); - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] benches.extend(valkey::benches()); Windsock::new(benches, cloud::AwsCloud::new_boxed(), &["release"]).run(); diff --git a/shotover-proxy/tests/lib.rs b/shotover-proxy/tests/lib.rs index b2a366c71..83e881205 100644 --- a/shotover-proxy/tests/lib.rs +++ b/shotover-proxy/tests/lib.rs @@ -10,11 +10,11 @@ mod cassandra_int_tests; mod kafka_int_tests; #[cfg(all(feature = "alpha-transforms", feature = "opensearch"))] mod opensearch_int_tests; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod runner; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod transforms; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod valkey_int_tests; pub fn shotover_process(topology_path: &str) -> ShotoverProcessBuilder { @@ -24,9 +24,9 @@ pub fn shotover_process(topology_path: &str) -> ShotoverProcessBuilder { } #[cfg(target_os = "macos")] -#[cfg(any(feature = "cassandra", feature = "redis"))] +#[cfg(any(feature = "cassandra", feature = "valkey"))] const CONNECTION_REFUSED_OS_ERROR: i32 = 61; #[cfg(not(target_os = "macos"))] -#[cfg(any(feature = "cassandra", feature = "redis"))] +#[cfg(any(feature = "cassandra", feature = "valkey"))] const CONNECTION_REFUSED_OS_ERROR: i32 = 111; diff --git a/shotover/Cargo.toml b/shotover/Cargo.toml index 97a056c37..3f6df96f9 100644 --- a/shotover/Cargo.toml +++ b/shotover/Cargo.toml @@ -34,7 +34,7 @@ kafka = [ "dep:base64", "dep:sasl", ] -redis = [ +valkey = [ "dep:redis-protocol", "dep:csv", "dep:crc16", @@ -44,7 +44,7 @@ opensearch = [ "dep:http", "dep:httparse", ] -default = ["cassandra", "redis", "kafka", "opensearch"] +default = ["cassandra", "valkey", "kafka", "opensearch"] [dependencies] atomic_enum = "0.3.0" @@ -141,4 +141,4 @@ pretty_assertions.workspace = true [[bench]] name = "benches" harness = false -required-features = ["cassandra", "redis", "kafka"] +required-features = ["cassandra", "valkey", "kafka"] diff --git a/shotover/src/codec/mod.rs b/shotover/src/codec/mod.rs index b5815eff5..249d8fc80 100644 --- a/shotover/src/codec/mod.rs +++ b/shotover/src/codec/mod.rs @@ -15,7 +15,7 @@ pub mod cassandra; pub mod kafka; #[cfg(feature = "opensearch")] pub mod opensearch; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] pub mod valkey; #[derive(Eq, PartialEq, Copy, Clone)] @@ -58,7 +58,7 @@ pub enum CodecState { Cassandra { compression: Compression, }, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey, #[cfg(feature = "kafka")] Kafka(KafkaCodecState), diff --git a/shotover/src/config/topology.rs b/shotover/src/config/topology.rs index 0bc198206..3530a85d4 100644 --- a/shotover/src/config/topology.rs +++ b/shotover/src/config/topology.rs @@ -77,7 +77,7 @@ impl Topology { } } -#[cfg(all(test, feature = "redis", feature = "cassandra"))] +#[cfg(all(test, feature = "valkey", feature = "cassandra"))] mod topology_tests { use crate::config::chain::TransformChainConfig; use crate::config::topology::Topology; diff --git a/shotover/src/connection.rs b/shotover/src/connection.rs index 83ab04aa9..9a01fedf6 100644 --- a/shotover/src/connection.rs +++ b/shotover/src/connection.rs @@ -533,7 +533,7 @@ impl DummyResponseInserter { } } -#[cfg(all(test, feature = "redis"))] +#[cfg(all(test, feature = "valkey"))] mod tests { use super::DummyResponseInserter; use crate::frame::{Frame, ValkeyFrame}; diff --git a/shotover/src/frame/mod.rs b/shotover/src/frame/mod.rs index 446ad516d..71f7317ea 100644 --- a/shotover/src/frame/mod.rs +++ b/shotover/src/frame/mod.rs @@ -13,7 +13,7 @@ use cassandra_protocol::compression::Compression; use kafka::KafkaFrame; #[cfg(feature = "opensearch")] pub use opensearch::OpenSearchFrame; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] pub use redis_protocol::resp2::types::BytesFrame as ValkeyFrame; use std::fmt::{Display, Formatter, Result as FmtResult}; @@ -23,13 +23,13 @@ pub mod cassandra; pub mod kafka; #[cfg(feature = "opensearch")] pub mod opensearch; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] pub mod valkey; pub mod value; #[derive(PartialEq, Debug, Clone, Copy)] pub enum MessageType { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey, #[cfg(feature = "cassandra")] Cassandra, @@ -45,7 +45,7 @@ impl MessageType { match self { #[cfg(feature = "cassandra")] MessageType::Cassandra => false, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => true, #[cfg(feature = "kafka")] MessageType::Kafka => true, @@ -59,7 +59,7 @@ impl MessageType { match self { #[cfg(feature = "cassandra")] MessageType::Cassandra => "cql", - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => "redis", #[cfg(feature = "kafka")] MessageType::Kafka => "kafka", @@ -75,7 +75,7 @@ impl From<&CodecState> for MessageType { match value { #[cfg(feature = "cassandra")] CodecState::Cassandra { .. } => Self::Cassandra, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] CodecState::Valkey => Self::Valkey, #[cfg(feature = "kafka")] CodecState::Kafka { .. } => Self::Kafka, @@ -93,7 +93,7 @@ impl Frame { Frame::Cassandra(_) => CodecState::Cassandra { compression: Compression::None, }, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => CodecState::Valkey, #[cfg(feature = "kafka")] Frame::Kafka(_) => CodecState::Kafka(KafkaCodecState { @@ -111,7 +111,7 @@ impl Frame { pub enum Frame { #[cfg(feature = "cassandra")] Cassandra(CassandraFrame), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey(ValkeyFrame), #[cfg(feature = "kafka")] Kafka(KafkaFrame), @@ -133,7 +133,7 @@ impl Frame { MessageType::Cassandra => { CassandraFrame::from_bytes(bytes, codec_state.as_cassandra()).map(Frame::Cassandra) } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => redis_protocol::resp2::decode::decode_bytes(&bytes) .map(|x| Frame::Valkey(x.unwrap().0)) .map_err(|e| anyhow!("{e:?}")), @@ -149,7 +149,7 @@ impl Frame { pub fn name(&self) -> &'static str { match self { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => "Valkey", #[cfg(feature = "cassandra")] Frame::Cassandra(_) => "Cassandra", @@ -165,7 +165,7 @@ impl Frame { match self { #[cfg(feature = "cassandra")] Frame::Cassandra(_) => MessageType::Cassandra, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => MessageType::Valkey, #[cfg(feature = "kafka")] Frame::Kafka(_) => MessageType::Kafka, @@ -175,7 +175,7 @@ impl Frame { } } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] pub fn valkey(&mut self) -> Result<&mut ValkeyFrame> { match self { Frame::Valkey(frame) => Ok(frame), @@ -197,7 +197,7 @@ impl Frame { } } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] pub fn into_valkey(self) -> Result { match self { Frame::Valkey(frame) => Ok(frame), @@ -238,7 +238,7 @@ impl Display for Frame { match self { #[cfg(feature = "cassandra")] Frame::Cassandra(frame) => write!(f, "Cassandra {}", frame), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(frame) => write!(f, "Valkey {:?}", frame), #[cfg(feature = "kafka")] Frame::Kafka(frame) => write!(f, "Kafka {}", frame), diff --git a/shotover/src/frame/value.rs b/shotover/src/frame/value.rs index e7e942781..cd532b340 100644 --- a/shotover/src/frame/value.rs +++ b/shotover/src/frame/value.rs @@ -1,7 +1,7 @@ //! Generic representations of data types that appear in messages #[cfg(feature = "cassandra")] pub mod cassandra; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] mod valkey; use bigdecimal::BigDecimal; diff --git a/shotover/src/lib.rs b/shotover/src/lib.rs index 69e78f364..63037e559 100644 --- a/shotover/src/lib.rs +++ b/shotover/src/lib.rs @@ -44,7 +44,7 @@ If we absolutely need unsafe code, it should be isolated within a separate small #![cfg_attr( any( not(feature = "cassandra"), - not(feature = "redis"), + not(feature = "valkey"), not(feature = "kafka"), not(feature = "opensearch"), ), @@ -52,7 +52,7 @@ If we absolutely need unsafe code, it should be isolated within a separate small )] #[cfg(all( not(feature = "cassandra"), - not(feature = "redis"), + not(feature = "valkey"), not(feature = "kafka"), not(feature = "opensearch"), ))] diff --git a/shotover/src/message/mod.rs b/shotover/src/message/mod.rs index 63eeed8a6..1845c91d4 100644 --- a/shotover/src/message/mod.rs +++ b/shotover/src/message/mod.rs @@ -3,7 +3,7 @@ use crate::codec::CodecState; #[cfg(feature = "cassandra")] use crate::frame::{cassandra, cassandra::CassandraMetadata}; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] use crate::frame::{valkey::valkey_query_type, ValkeyFrame}; use crate::frame::{Frame, MessageType}; use anyhow::{anyhow, Context, Result}; @@ -22,7 +22,7 @@ pub type MessageIdSet = HashSet; pub enum Metadata { #[cfg(feature = "cassandra")] Cassandra(CassandraMetadata), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey, #[cfg(feature = "kafka")] Kafka, @@ -37,7 +37,7 @@ impl Metadata { pub fn to_error_response(&self, error: String) -> Result { #[allow(unreachable_code)] Ok(Message::from_frame(match self { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Metadata::Valkey => { // Valkey errors can not contain newlines at the protocol level let message = format!("ERR {error}") @@ -331,7 +331,7 @@ impl Message { message_type, .. } => match message_type { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => nonzero!(1u32), #[cfg(feature = "cassandra")] MessageType::Cassandra => cassandra::raw_frame::cell_count(bytes)?, @@ -344,7 +344,7 @@ impl Message { MessageInner::Modified { frame } | MessageInner::Parsed { frame, .. } => match frame { #[cfg(feature = "cassandra")] Frame::Cassandra(frame) => frame.cell_count()?, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => nonzero!(1u32), #[cfg(feature = "kafka")] Frame::Kafka(_) => todo!(), @@ -375,7 +375,7 @@ impl Message { match self.frame() { #[cfg(feature = "cassandra")] Some(Frame::Cassandra(cassandra)) => cassandra.get_query_type(), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Some(Frame::Valkey(valkey)) => valkey_query_type(valkey), // free-standing function as we cant define methods on ValkeyFrame #[cfg(feature = "kafka")] Some(Frame::Kafka(_)) => todo!(), @@ -424,7 +424,7 @@ impl Message { MessageType::Cassandra => { Ok(Metadata::Cassandra(cassandra::raw_frame::metadata(bytes)?)) } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => Ok(Metadata::Valkey), #[cfg(feature = "kafka")] MessageType::Kafka => Ok(Metadata::Kafka), @@ -437,7 +437,7 @@ impl Message { Frame::Cassandra(frame) => Ok(Metadata::Cassandra(frame.metadata())), #[cfg(feature = "kafka")] Frame::Kafka(_) => Ok(Metadata::Kafka), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => Ok(Metadata::Valkey), Frame::Dummy => Err(anyhow!("dummy has no metadata")), #[cfg(feature = "opensearch")] @@ -459,7 +459,7 @@ impl Message { /// Returns true iff it is known that the server will not send a response to this request, instead we need to generate a dummy response pub(crate) fn response_is_dummy(&mut self) -> bool { match self.message_type() { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => false, #[cfg(feature = "cassandra")] MessageType::Cassandra => false, @@ -494,7 +494,7 @@ impl Message { match metadata { #[cfg(feature = "cassandra")] Metadata::Cassandra(metadata) => Frame::Cassandra(metadata.backpressure_response()), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Metadata::Valkey => unimplemented!(), #[cfg(feature = "kafka")] Metadata::Kafka => unimplemented!(), @@ -532,7 +532,7 @@ impl Message { match frame { #[cfg(feature = "cassandra")] Frame::Cassandra(cassandra) => Some(cassandra.stream_id), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Frame::Valkey(_) => None, #[cfg(feature = "kafka")] Frame::Kafka(_) => None, diff --git a/shotover/src/server.rs b/shotover/src/server.rs index bbb6e4df3..43d495f82 100644 --- a/shotover/src/server.rs +++ b/shotover/src/server.rs @@ -836,7 +836,7 @@ enum PendingRequests { impl PendingRequests { fn new(message_type: MessageType) -> Self { match message_type { - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] MessageType::Valkey => PendingRequests::Ordered(vec![]), #[cfg(feature = "cassandra")] MessageType::Cassandra => PendingRequests::Unordered(Default::default()), diff --git a/shotover/src/sources/mod.rs b/shotover/src/sources/mod.rs index 05501d1ae..658e45990 100644 --- a/shotover/src/sources/mod.rs +++ b/shotover/src/sources/mod.rs @@ -6,7 +6,7 @@ use crate::sources::cassandra::{CassandraConfig, CassandraSource}; use crate::sources::kafka::{KafkaConfig, KafkaSource}; #[cfg(feature = "opensearch")] use crate::sources::opensearch::{OpenSearchConfig, OpenSearchSource}; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] use crate::sources::valkey::{ValkeyConfig, ValkeySource}; use anyhow::Result; use serde::{Deserialize, Serialize}; @@ -19,7 +19,7 @@ pub mod cassandra; pub mod kafka; #[cfg(feature = "opensearch")] pub mod opensearch; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] pub mod valkey; #[derive(Serialize, Deserialize, Debug, Clone, Copy)] @@ -33,7 +33,7 @@ pub enum Transport { pub enum Source { #[cfg(feature = "cassandra")] Cassandra(CassandraSource), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey(ValkeySource), #[cfg(feature = "kafka")] Kafka(KafkaSource), @@ -46,7 +46,7 @@ impl Source { match self { #[cfg(feature = "cassandra")] Source::Cassandra(c) => c.join_handle, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Source::Valkey(r) => r.join_handle, #[cfg(feature = "kafka")] Source::Kafka(r) => r.join_handle, @@ -61,7 +61,7 @@ impl Source { pub enum SourceConfig { #[cfg(feature = "cassandra")] Cassandra(CassandraConfig), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey(ValkeyConfig), #[cfg(feature = "kafka")] Kafka(KafkaConfig), @@ -77,7 +77,7 @@ impl SourceConfig { match self { #[cfg(feature = "cassandra")] SourceConfig::Cassandra(c) => c.get_source(trigger_shutdown_rx).await, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] SourceConfig::Valkey(r) => r.get_source(trigger_shutdown_rx).await, #[cfg(feature = "kafka")] SourceConfig::Kafka(r) => r.get_source(trigger_shutdown_rx).await, @@ -90,7 +90,7 @@ impl SourceConfig { match self { #[cfg(feature = "cassandra")] SourceConfig::Cassandra(c) => &c.name, - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] SourceConfig::Valkey(r) => &r.name, #[cfg(feature = "kafka")] SourceConfig::Kafka(r) => &r.name, diff --git a/shotover/src/transforms/coalesce.rs b/shotover/src/transforms/coalesce.rs index 514e4f36d..33bc2084c 100644 --- a/shotover/src/transforms/coalesce.rs +++ b/shotover/src/transforms/coalesce.rs @@ -109,7 +109,7 @@ impl Transform for Coalesce { } } -#[cfg(all(test, feature = "redis"))] +#[cfg(all(test, feature = "valkey"))] mod test { use crate::frame::{Frame, ValkeyFrame}; use crate::message::Message; diff --git a/shotover/src/transforms/debug/returner.rs b/shotover/src/transforms/debug/returner.rs index fa9b02b0b..4a1195976 100644 --- a/shotover/src/transforms/debug/returner.rs +++ b/shotover/src/transforms/debug/returner.rs @@ -39,7 +39,7 @@ impl TransformConfig for DebugReturnerConfig { pub enum Response { #[serde(skip)] Message(Message), - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Valkey(String), Fail, } @@ -88,7 +88,7 @@ impl Transform for DebugReturner { message.set_request_id(request.id()); Ok(message) } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Response::Valkey(string) => { use crate::frame::{Frame, ValkeyFrame}; use crate::message::Message; diff --git a/shotover/src/transforms/filter.rs b/shotover/src/transforms/filter.rs index f425d8f26..5410175e8 100644 --- a/shotover/src/transforms/filter.rs +++ b/shotover/src/transforms/filter.rs @@ -100,7 +100,7 @@ impl Transform for QueryTypeFilter { } } -#[cfg(all(test, feature = "redis"))] +#[cfg(all(test, feature = "valkey"))] mod test { use super::Filter; use crate::frame::Frame; diff --git a/shotover/src/transforms/mod.rs b/shotover/src/transforms/mod.rs index efbc0f991..eb9973204 100644 --- a/shotover/src/transforms/mod.rs +++ b/shotover/src/transforms/mod.rs @@ -35,7 +35,7 @@ pub mod tee; #[cfg(feature = "cassandra")] pub mod throttling; pub mod util; -#[cfg(feature = "redis")] +#[cfg(feature = "valkey")] pub mod valkey; /// Provides extra context that may be needed when creating a Transform diff --git a/shotover/src/transforms/query_counter.rs b/shotover/src/transforms/query_counter.rs index 9b20bee51..049e91a4d 100644 --- a/shotover/src/transforms/query_counter.rs +++ b/shotover/src/transforms/query_counter.rs @@ -76,7 +76,7 @@ impl Transform for QueryCounter { self.increment_counter(statement.short_name().to_string(), "cassandra"); } } - #[cfg(feature = "redis")] + #[cfg(feature = "valkey")] Some(Frame::Valkey(frame)) => { if let Some(query_type) = crate::frame::valkey::valkey_query_name(frame) { self.increment_counter(query_type, "valkey"); diff --git a/shotover/src/transforms/tee.rs b/shotover/src/transforms/tee.rs index 8b7bb2ab2..427a948dd 100644 --- a/shotover/src/transforms/tee.rs +++ b/shotover/src/transforms/tee.rs @@ -591,7 +591,7 @@ struct AppState { result_source: Arc, } -#[cfg(all(test, feature = "redis"))] +#[cfg(all(test, feature = "valkey"))] mod tests { use super::*; use crate::{frame::MessageType, transforms::null::NullSinkConfig}; diff --git a/shotover/src/transforms/util/cluster_connection_pool.rs b/shotover/src/transforms/util/cluster_connection_pool.rs index 95bf61dcc..444e9fce9 100644 --- a/shotover/src/transforms/util/cluster_connection_pool.rs +++ b/shotover/src/transforms/util/cluster_connection_pool.rs @@ -305,7 +305,7 @@ async fn rx_process( Ok(()) } -#[cfg(all(test, feature = "redis"))] +#[cfg(all(test, feature = "valkey"))] mod test { use super::spawn_read_write_tasks; use crate::codec::valkey::ValkeyCodecBuilder; diff --git a/shotover/src/transforms/valkey/mod.rs b/shotover/src/transforms/valkey/mod.rs index 9165f6e05..52b9b3591 100644 --- a/shotover/src/transforms/valkey/mod.rs +++ b/shotover/src/transforms/valkey/mod.rs @@ -1,6 +1,6 @@ use crate::transforms::util::ConnectionError; -#[cfg(all(feature = "redis", feature = "cassandra"))] +#[cfg(all(feature = "valkey", feature = "cassandra"))] pub mod cache; pub mod cluster_ports_rewrite; pub mod sink_cluster;