Repository navigation
Upgrade redis client version - #543
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Rustls dependencies and startup limitador/Cargo.toml, limitador-server/Cargo.toml, limitador-server/src/main.rs, Dockerfile*, limitador/src/lib.rs |
Redis dependencies use rustls features. The server replaces its OpenSSL dependency and installs a default rustls crypto provider at startup. Docker build environments set OPENSSL_NO_VENDOR=1. Crate documentation describes the provider configuration requirement. |
Redis storage connection and recovery limitador/src/storage/redis/redis_async.rs, limitador/src/storage/redis/redis_cached.rs, limitador/src/storage/redis/redis_sync.rs |
Async Redis storage disables connection and response timeouts and matches missing scripts using ServerErrorKind::NoScript. Tests cover slow responses, script reload, and updated Redis error kinds. Cached storage retains its configured timeout values and now passes them as Some(Duration). |
Redis TLS sandbox certificates and configuration limitador-server/sandbox/Makefile, limitador-server/sandbox/redis-tls/*, limitador-server/sandbox/docker-compose-limitador-redis-tls.yaml |
The sandbox generates CA and Redis server certificates with specified extensions. Limitador loads the CA certificate, and the Redis URL no longer includes #insecure. The TLS instructions describe CA trust and hostname verification. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Other
Possibly related PRs
- Kuadrant/limitador#537: Changes Docker build stages and OpenSSL paths, which are also affected by this PR’s build environment updates.
Suggested reviewers: eguzki
Merge Risk: 
Minimal · previous review 16252
-
No actionable merge-blocking risk was identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "Upgrade redis client version" matches the main change. The PR upgrades the Redis client from 0.27 to 1.7 in limitador/Cargo.toml and updates the storage code for the new client's API, including timeouts, error kinds, and script reloading. The title does not mention the TLS migration from native-tls to rustls, which the PR objectives also describe as a key part of the work. That omission makes the title partially complete, but it does not make it inaccurate.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 5 files. (10 skipped: 10 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the Redis stream,
While rustls guards the TLS dream.
A CA rests in its mount,
And scripts reload when counts must count.
The rabbit hops through builds anew,
With certificates in view.
| rustls-openssl = { version = "0.4.1", package = "quixotic-plecostomus-rustls-openssl", default-features = false, features = [ | ||
| "tls12", | ||
| ] } |
There was a problem hiding this comment.
This dep enables using OpenSSL provider from the host, see here https://github.com/praxis-proxy/praxis/blob/main/docs/operating/fips.md#scope-and-exemptions
3787967 to
16252be
Compare
| rustls_openssl::default_provider() | ||
| .install_default() | ||
| .map_err(|_| "a rustls crypto provider was already installed before server startup")?; |
There was a problem hiding this comment.
So this is new; the lib no longer configures a crypto provider, and expects the user of the crate to provide one
16252be to
f15770f
Compare
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
f15770f to
3f4d9fc
Compare
eguzki
left a comment
There was a problem hiding this comment.
LGTM
FIPS compliance ✅
Version incompatibility checks ✅
Manual verification: Ran the redis-tls sandbox manually and checked counters ✅
Worth a tracking issue to switch back to the canonical rustls-openssl name once patches land upstream.
Left one nit, but feel free to ignore it
|
|
||
| #[actix_rt::main] | ||
| async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| rustls_openssl::default_provider() |
There was a problem hiding this comment.
woudl it make sense to gate install of the tls provider? Seems to me that Redis is the only consumer of rustls in limitador-server today.
| ENV GITHUB_SHA=${GITHUB_SHA:-unknown} | ||
| ENV RUSTFLAGS="-C target-feature=-crt-static" | ||
| ENV RUSTFLAGS="-C target-feature=-crt-static" \ | ||
| OPENSSL_NO_VENDOR=1 |
There was a problem hiding this comment.
nice build time safety rail.
Stack created with GitHub Stacks CLI • Give Feedback 💬
Summary by CodeRabbit