Skip to content

Commit

Permalink
Merge branch 'main' into redis_tls_use_bitnami
Browse files Browse the repository at this point in the history
  • Loading branch information
conorbros authored Oct 9, 2023
2 parents 06fca68 + 34bdcb6 commit 29014ea
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 205 deletions.
407 changes: 216 additions & 191 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ async-trait = "0.1.30"
typetag = "0.2.5"
aws-throwaway = "0.2.0"
tokio-bin-process = "0.4.0"
ordered-float = { version = "4.0.0", features = ["serde"] }

[patch.crates-io]
bigdecimal = { git = "https://github.com/rukai/bigdecimal-rs", branch = "0.4.2"}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.72"
channel = "1.73"
components = [ "rustfmt", "clippy" ]
targets = [ "aarch64-unknown-linux-gnu" ]
6 changes: 2 additions & 4 deletions shotover-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ license = "Apache-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
shell-quote = "0.3.0"
shotover = { path = "../shotover" }

[dev-dependencies]
Expand Down Expand Up @@ -49,13 +48,12 @@ rustls-pemfile = "1.0.2"
aws-throwaway.workspace = true
windsock = { path = "../windsock" }
regex = "1.7.0"
cql-ws = { git = "https://github.com/conorbros/cql-ws" }
cql-ws = { git = "https://github.com/shotover/cql-ws" }
opensearch = "2.1.0"
serde_json = "1.0.103"
time = { version = "0.3.25" }
inferno = { version = "0.11.15", default-features = false, features = ["multithreaded", "nameattr"] }
# workaround segfault in cassandra-cpp, seems to be caused by recent upgrade of openssl-src from 1.1.1 to 3.0.0
openssl-sys = { version = "=0.9.92" }
shell-quote = "0.3.0"

[features]
# Include WIP alpha transforms in the public API
Expand Down
2 changes: 0 additions & 2 deletions shotover-proxy/tests/cassandra_int_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ async fn passthrough_encode(#[case] driver: CassandraDriver) {
#[rstest]
#[case::scylla(Scylla)]
//#[case::cdrs(CdrsTokio)] // TODO
#[cfg_attr(feature = "cassandra-cpp-driver-tests", case::datastax(Datastax))]
#[tokio::test(flavor = "multi_thread")]
async fn source_tls_and_single_tls(#[case] driver: CassandraDriver) {
test_helpers::cert::generate_cassandra_test_certs();
Expand Down Expand Up @@ -282,7 +281,6 @@ async fn cluster_multi_rack(#[case] driver: CassandraDriver) {
#[rstest]
#[case::scylla(Scylla)]
//#[case::cdrs(CdrsTokio)] // TODO
#[cfg_attr(feature = "cassandra-cpp-driver-tests", case::datastax(Datastax))]
#[tokio::test(flavor = "multi_thread")]
async fn source_tls_and_cluster_tls(#[case] driver: CassandraDriver) {
test_helpers::cert::generate_cassandra_test_certs();
Expand Down
4 changes: 2 additions & 2 deletions shotover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pretty-hex = "0.3.0"
tokio-stream = "0.1.2"
bytes-utils = "0.1.1"
derivative = "2.1.1"
cached = { version = "0.45", features = ["async"] }
cached = { version = "0.46", features = ["async"] }
async-recursion = "1.0"
governor = { version = "0.6", default-features = false, features = ["std", "jitter", "quanta"] }
nonzero_ext = "0.3.0"
Expand Down Expand Up @@ -72,7 +72,7 @@ halfbrown = "0.2.1"
redis-protocol.workspace = true
cassandra-protocol.workspace = true
crc16 = "0.4.0"
ordered-float = { version = "3.0.0", features = ["serde"] }
ordered-float.workspace = true

#Crypto
aws-config = "0.56.0"
Expand Down
12 changes: 8 additions & 4 deletions shotover/src/transforms/cassandra/sink_cluster/rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use cql3_parser::common::{
use cql3_parser::select::{Select, SelectElement};
use futures::future::try_join_all;
use itertools::Itertools;
use std::fmt::Write;
use std::net::{IpAddr, Ipv4Addr};
use uuid::Uuid;
use version_compare::Cmp;
Expand Down Expand Up @@ -307,10 +308,13 @@ impl MessageRewriter {
})
.collect();
if !prepared_results.windows(2).all(|w| w[0] == w[1]) {
let err_str = prepared_results
.iter()
.map(|p| format!("\n{:?}", p))
.collect::<String>();
let err_str =
prepared_results
.iter()
.fold(String::new(), |mut output, b| {
let _ = write!(output, "\n{b:?}");
output
});

tracing::error!(
"Nodes did not return the same response to PREPARE statement {err_str}"
Expand Down
2 changes: 1 addition & 1 deletion test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cassandra-cpp = { version = "2.0.0", default-features = false, features = ["log"
scylla.workspace = true
openssl.workspace = true
bytes.workspace = true
ordered-float = { version = "3.0.0", features = ["serde"] }
ordered-float.workspace = true
tokio.workspace = true
uuid.workspace = true
redis.workspace = true
Expand Down

0 comments on commit 29014ea

Please sign in to comment.