Skip to content

Commit 2f57463

Browse files
committed
Refactor Redis commands and remove ACL feature
- Removed ACL command implementations from `mod.rs` and associated tests. - Cleaned up connection handling in `connection.rs` by simplifying TLS configuration. - Deleted the `script.rs` module and its related tests - Updated various test files to remove references to script-related tests. - Adjusted cluster tests to improve key handling and slot calculations. - Enhanced utility functions for better TLS setup in tests. Signed-off-by: Avi Fenesh <[email protected]>
1 parent c9e9041 commit 2f57463

22 files changed

+63
-1106
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
"black"
6363
],
6464
"rust-analyzer.cargo.features": "all",
65+
"rust-analyzer.procMacro.enable": true,
66+
"rust-analyzer.cargo.buildScripts.enable": true,
6567
"dotnet.defaultSolution": "csharp/csharp.sln",
6668
"java.compile.nullAnalysis.mode": "automatic",
6769
"java.configuration.updateBuildConfiguration": "interactive",

glide-core/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bytes = "1"
1313
futures = "^0.3"
1414
redis = { path = "./redis-rs/redis", features = [
1515
"aio",
16+
"keep-alive",
1617
"tokio-comp",
1718
"tokio-rustls-comp",
1819
"connection-manager",
@@ -58,12 +59,13 @@ standalone_heartbeat = []
5859
rsevents = "0.3.1"
5960
socket2 = "^0.5"
6061
tempfile = "3.3.0"
61-
rstest = "^0.23"
62+
rstest = "^0.25"
6263
serial_test = "3"
63-
criterion = { version = "^0.5", features = ["html_reports", "async_tokio"] }
64-
which = "6"
65-
ctor = "0.2.2"
64+
criterion = { version = "^0.6", features = ["html_reports", "async_tokio"] }
65+
which = "7"
66+
ctor = "0.4"
6667
redis = { path = "./redis-rs/redis", features = ["tls-rustls-insecure"] }
68+
rustls = { version = "0.23", features = ["ring"], default-features = false}
6769
iai-callgrind = "0.14"
6870
tokio = { version = "1", features = ["rt-multi-thread"] }
6971
glide-core = { path = ".", features = [

glide-core/benches/rotating_buffer_benchmark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
22

3-
use std::{io::Write, ptr::from_mut};
3+
use std::{hint::black_box, io::Write, ptr::from_mut};
44

55
use bytes::BufMut;
6-
use criterion::{Criterion, black_box, criterion_group, criterion_main};
6+
use criterion::{Criterion, criterion_group, criterion_main};
77
use glide_core::{
88
command_request::{Command, CommandRequest, RequestType},
99
command_request::{command, command_request},

glide-core/redis-rs/redis/Cargo.toml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,15 @@ ryu = "1.0"
2626
itoa = "1.0"
2727

2828
# Strum is a set of macros and traits for working with enums and strings easier in Rust.
29-
strum = "0.26"
30-
strum_macros = "0.26"
29+
strum = "0.27"
30+
strum_macros = "0.27"
3131

3232
# This is a dependency that already exists in url
3333
percent-encoding = "2.1"
3434

3535
# We need this for redis url parsing
3636
url = "2.5.4"
3737

38-
# We need this for script support
39-
sha1_smol = { version = "1.0", optional = true }
40-
4138
combine = { version = "4.6", default-features = false, features = ["std"] }
4239

4340
# Only needed for AIO
@@ -73,10 +70,10 @@ native-tls = { version = "0.2", optional = true }
7370
tokio-native-tls = { version = "0.3", optional = true }
7471

7572
# Only needed for rustls
76-
rustls = { version = "0.22", optional = true }
77-
webpki-roots = { version = "0.26", optional = true }
78-
rustls-native-certs = { version = "0.7", optional = true }
79-
tokio-rustls = { version = "0.25", optional = true }
73+
rustls = { version = "0.23", features = ["ring"], default-features = false, optional = true }
74+
75+
rustls-native-certs = { version = "0.8", optional = true }
76+
tokio-rustls = { version = "0.26", default-features = false, optional = true }
8077
rustls-pemfile = { version = "2", optional = true }
8178
rustls-pki-types = { version = "1", optional = true }
8279

@@ -103,18 +100,14 @@ lazy_static = "1"
103100

104101
[features]
105102
default = [
106-
"acl",
107-
"streams",
108-
"geospatial",
109-
"script",
103+
"aio",
110104
"keep-alive",
111105
"tokio-comp",
112106
"tokio-rustls-comp",
113107
"connection-manager",
114108
"cluster",
115109
"cluster-async",
116110
]
117-
acl = []
118111
aio = [
119112
"bytes",
120113
"pin-project-lite",
@@ -131,7 +124,6 @@ aio = [
131124
geospatial = []
132125
json = ["serde", "serde/derive", "serde_json"]
133126
cluster = ["crc16", "rand"]
134-
script = ["sha1_smol"]
135127
tls-native-tls = ["native-tls"]
136128
tls-rustls = [
137129
"rustls",
@@ -140,7 +132,7 @@ tls-rustls = [
140132
"rustls-pki-types",
141133
]
142134
tls-rustls-insecure = ["tls-rustls"]
143-
tls-rustls-webpki-roots = ["tls-rustls", "webpki-roots"]
135+
144136
tokio-comp = ["aio", "tokio/net", "tokio-retry2"]
145137
tokio-native-tls-comp = ["tokio-comp", "tls-native-tls", "tokio-native-tls"]
146138
tokio-rustls-comp = ["tokio-comp", "tls-rustls", "tokio-rustls"]
@@ -160,13 +152,13 @@ disable-client-setinfo = []
160152
tls = ["tls-native-tls"] # use "tls-native-tls" instead
161153

162154
[dev-dependencies]
163-
rand = "0.8"
155+
rand = "0.9"
164156
socket2 = "0.5"
165157
assert_approx_eq = "1.0"
166158
fnv = "1.0.5"
167159
futures = "0.3"
168160
futures-time = "3"
169-
criterion = "0.4"
161+
criterion = "0.6"
170162
partial-io = { version = "0.5", features = ["tokio", "quickcheck1"] }
171163
quickcheck = "1.0.3"
172164
tokio = { version = "1", features = [
@@ -175,13 +167,13 @@ tokio = { version = "1", features = [
175167
"rt-multi-thread",
176168
"time",
177169
] }
178-
tempfile = "=3.6.0"
170+
tempfile = "3"
179171
once_cell = "1"
180172
anyhow = "1"
181173
sscanf = "0.4.1"
182-
serial_test = "^2"
183-
versions = "6.3"
184-
which = "7.0.1"
174+
serial_test = "3"
175+
versions = "7"
176+
which = "7"
185177
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
186178

187179
[[test]]
@@ -192,9 +184,6 @@ required-features = ["tokio-comp"]
192184
name = "parser"
193185
required-features = ["aio"]
194186

195-
[[test]]
196-
name = "test_acl"
197-
198187
[[test]]
199188
name = "test_module_json"
200189
required-features = ["json", "serde/derive"]

glide-core/redis-rs/redis/benches/bench_cluster.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#![allow(clippy::unit_arg)] // want to allow this for `black_box()`
22
#![cfg(feature = "cluster")]
3-
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
3+
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
44
use redis::cluster::cluster_pipe;
5+
use std::hint::black_box;
56

67
use support::*;
78

glide-core/redis-rs/redis/benches/bench_cluster_async.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#![allow(clippy::unit_arg)] // want to allow this for `black_box()`
22
#![cfg(feature = "cluster")]
3-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
3+
use criterion::{criterion_group, criterion_main, Criterion};
44
use futures_util::{stream, TryStreamExt};
55
use redis::RedisError;
6+
use std::hint::black_box;
67

78
use support::*;
89
use tokio::runtime::Runtime;

0 commit comments

Comments
 (0)