Skip to content

MOD-18913: absorb the RLTest upgrade - unescape moduleArgs semicolons - #2197

Merged
LiranAbir merged 4 commits into
MOD-18751-cluster-bus-port-protected-modefrom
MOD-18913-rltest-pin-upgrade
Sep 27, 2026
Merged

LiranAbir merged 4 commits into
MOD-18751-cluster-bus-port-protected-modefrom
MOD-18913-rltest-pin-upgrade

Conversation

@LiranAbir

@LiranAbir LiranAbir commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #2194. Base is that PR's branch, so the diff here is only the re-pin; retarget to master if #2194 lands first.

Problem

With the pin on current RLTest master, test_globalconfigs fails on every non-cluster phase — gen, slaves, aof, aof_slaves, across x64, arm64 and sanitizer — with

Error 111 connecting to localhost:6379. Connection refused.

while the test constructs its own Env(...). 506 tests run, 2 fail.

The cause is in fix_modulesArgs. It splits the moduleArgs string with split_by_semicolon, which both splits on unescaped ; and unescapes the escaped ones — then the plain-string branch added in RLTest#243 discards that result and reuses the raw input:

parts = split_by_semicolon(modulesArgs)
if len(parts) == 1:
    is_plain_str = True
    modulesArgs = [[modulesArgs.strip()]]   # backslashes still there

So the two tests that pass a compaction policy as a plain string get it through with the escapes intact:

value handed to the module
old pin COMPACTION_POLICY max:1m:1d;min:10s:1h;avg:2h:10d;avg:3d:100d
RLTest master COMPACTION_POLICY max:1m:1d\;min:10s:1h\;avg:2h:10d\;avg:3d:100d

The policy is then invalid, the module fails to load, the server stops — and because the configuration is rejected before the logfile is opened, the retained log is empty, which is why the only symptom is the refused connection. Exactly the two affected tests are the ones whose moduleArgs string has escaped semicolons and no plain one: test_module_config_from_module_arguments_raises_deprecation_messages and test_compaction_policy.

Note this is not RLTest#239 / #242 (waitCluster), the suspects named on the ticket: those touch cluster startup, and these phases are not clustered.

Change

Nothing RTS-side — the bug is in RLTest and is fixed there by RLTest#256, which takes the split's already-unescaped value. This PR only moves both pins onto it.

Both files move together, as they drive different legs: requirements_docker.txt is baked into the per-distro images (build-linux-*), tests/flow/requirements.txt is installed by .install/lib/setup-python.sh (macOS, coverage, valgrind, sanitizer).

The pin points at the fork commit until #256 merges, then moves to the upstream sha. Worth deciding separately whether this repo should keep a git-commit pin at all — a released RLTest == 0.7.29 would make this drift reviewable instead of silent, as RedisBloom and RedisJSON already do.

Not in scope

  • RESP3. MOD-18751 / MOD-18906 / MOD-18913: bring the oss-cluster flow tests back #2194 caps the client at redis ~= 5.0.8, keeping the suite on RESP2. Supporting RESP3 properly — protocol=2 on the connections the tests build themselves, or protocol-agnostic assertions — stays a follow-up; the cap moves the date, it does not remove it.
  • The tls_cluster leg. It has not reported on 782cf6fd9 yet, so it is unverified rather than fixed. If it is still red after this, it needs its own investigation.

Verification

test_globalconfigs cannot be run on this host (no Linux build env), so the fix is verified at the unit level in RLTest#256: two tests over fix_modulesArgs, with and without defaults to merge, that fail on RLTest master and pass with the fix, and the 15 existing ones unaffected.

CI here is the end-to-end check. Note the docker-image-changes label is required, or the build-linux-* legs reuse the prebuilt image — whose tag is the redis ref, not a content hash — and silently test the old RLTest.

🤖 Generated with Claude Code


Note

Low Risk
Test-only dependency pin with no production code changes; risk is limited to CI/local test environment consistency (docker-image rebuild may be needed).

Overview
Re-pins RLTest in requirements_docker.txt and tests/flow/requirements.txt from abc312868 to commit 7e9f69ac (upstream fix in RLTest#256).

That regression left escaped semicolons in plain moduleArgs strings, so compaction policy values passed to the module were invalid, Redis failed to load the module, and test_globalconfigs phases that spin up their own Env(...) hit connection refused. Comments in both files document MOD-18913 and the pin rationale. No application or module code changes—CI and local flow tests pick up the fixed harness when images or .install/lib/setup-python.sh install these deps.

Reviewed by Cursor Bugbot for commit ee8af55. Bugbot is set up for automated code reviews on this repo. Configure here.

The plain-string branch of fix_modulesArgs reuses the raw input instead of
the unescaped split, so an escaped semicolon reaches the module with its
backslash. test_globalconfigs passes COMPACTION_POLICY that way, the module
then fails to load, the server never starts, and the test reports only
Connection refused against the Env it just built - on gen, slaves, aof and
aof_slaves.

Fixed upstream in RLTest#256; pinned to that commit until it merges.

Co-Authored-By: Claude Opus 5 <[email protected]>
@LiranAbir LiranAbir added the docker-image-changes Force CI to build Docker images locally instead of pulling prebuilt registry images. label Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.19%. Comparing base (782cf6f) to head (ee8af55).

Additional details and impacted files
@@                              Coverage Diff                              @@
##           MOD-18751-cluster-bus-port-protected-mode    #2197      +/-   ##
=============================================================================
+ Coverage                                      70.11%   70.19%   +0.08%     
=============================================================================
  Files                                             41       41              
  Lines                                           8622     8622              
=============================================================================
+ Hits                                            6045     6052       +7     
+ Misses                                          2577     2570       -7     
Flag Coverage Δ
flow 70.19% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

RedisLabsModules/RLTest#256 merged as 7e9f69ac1, so the escaped-semicolon fix is
available upstream and the pin no longer has to reference a fork. Same code
either way - 8dc964e was that PR's head - so this changes nothing in CI, it just
stops the branch from merging with a personal fork as a dependency.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 965b2db. Configure here.

Comment thread requirements_docker.txt Resolved
An abbreviated SHA only resolves while the commit stays reachable from the
default branch, because a git fetch of a specific object needs the full hash and
an abbreviation is resolved after the clone. It works today - CI on the previous
commit passed - but it is a needless dependency on that reachability, and the
pin this replaced was a full SHA. Same commit either way.

Raised by Cursor Bugbot on 965b2db.
@LiranAbir
LiranAbir requested a review from gabsow September 27, 2026 08:06
@sonarqubecloud

Copy link
Copy Markdown

@LiranAbir
LiranAbir merged commit b650306 into MOD-18751-cluster-bus-port-protected-mode Sep 27, 2026
45 checks passed
@LiranAbir
LiranAbir deleted the MOD-18913-rltest-pin-upgrade branch September 27, 2026 08:17
LiranAbir added a commit that referenced this pull request Sep 27, 2026
…ack (#2194)

* MOD-18751: waive cluster bus protected mode for the oss-cluster phase

redis/redis#15722 added cluster-bus-port-protected-mode, and on the 8.12 line it
defaults to enabled: a node started with cluster-enabled and without tls-cluster
then refuses to start, because its cluster bus port would be unauthenticated.
That is how the oss-cluster phase is built, so every shard dies at startup and
each test fails at connect with "Connection refused". The refusal happens while
the configuration is validated, before the server opens its logfile, so the
retained logs are empty and say nothing about the cause.

Waive it for that phase. The bus ports here are bound to localhost on an
ephemeral host, which is the condition the directive documents for waiving, and
they were equally unauthenticated before the redis change - which only made
running them an explicit choice.

The option is not passed blind, because a redis that does not have it rejects
the directive and fails to start the same way. RLTest takes it as an option
rather than guessing, since nothing it can see distinguishes a build that has
the option from one that does not: the 8.12 line reports 8.9.241 in version.h,
the same as builds from before the change. CLUSTER_BUS_PROTECTED_MODE= omits it
for anyone running the cluster phase against an older redis locally.

The tls_cluster phase is left alone, since tls-cluster authenticates the bus,
and so is the existing-env phase, where RLTest starts no servers.

Requires RLTest with the option (RedisLabsModules/RLTest#255).

* Keep the waiver inside the oss-cluster phase

Setting it on RLTEST_ARGS in the OSS_CLUSTER block leaks into the tls_cluster
block below, which is a separate if and inherits the parent shell's value - the
tls_cluster phase was getting the option too, which this change had claimed it
would not. Set it inside each oss-cluster invocation's own subshell instead, as
the other phases do.

Found by dry-running tests.sh with NOP=1 and reading the generated RLTest
configuration per phase. Verified after: one occurrence, in "tests on OSS
cluster" only; the general, slaves, AOF and tls_cluster phases carry none.

Note the pre-existing duplicate --cluster_node_timeout in the tls_cluster
configuration, which comes from the same leak and is left alone here.

* Trigger CI

* MOD-18906 - Start the failover test's replicas on a protected cluster bus (#2196)

test_topology_events:test_failover spawns its own cluster-node replicas, rather
than relying on RLTest, so RLTest's cluster-bus-port-protected-mode waiver does
not reach them. Since redis/redis#15722 a cluster node whose bus port is not
authenticated by tls-cluster refuses to start unless protection is waived, so
those replicas died at startup and the test timed out after 2308s on every
oss-cluster leg.

Mirror the master's value of the option onto the replica we spawn. The config is
absent on older redis, which reports an empty dict and gets nothing added, since
passing an unknown config would be fatal there instead.

Also bound the wait for the replica to serve. It was the one unbounded wait in
the helper, so a replica that never started produced only a test timeout, with
the cause nowhere in the output: a config redis rejects is reported before the
logfile is opened, leaving an empty log.

Co-authored-by: Claude Opus 5 <[email protected]>

* MOD-18913 - Cap redis-py below 6 so the suite stays on RESP2

RLTest's own requirement on the client is uncapped (redis = ">=5.0.0"), where the
commit this repo was pinned to until now capped it at "^5.0.0rc2". Moving the pin
therefore let pip install redis-py 8.1.0, which negotiates RESP3 by default, and
under RESP3 TS.MRANGE ... GROUPBY replies with a map rather than rows:

    ((filtered_by, withlabels, samples),) = result
    ValueError: too many values to unpack (expected 3)

Pin the client to the 5.x series, which is what the old RLTest pin was silently
giving us, so the pin bump does not carry a protocol change with it. Supporting
RESP3 in the assertions is the real fix and stays with MOD-18913.

* Restore the MOD-18906 replica fix

It was reverted by accident in the previous commit, which picked up a stale
staged copy of the file alongside the requirements change.

* MOD-18913: absorb the RLTest upgrade - unescape moduleArgs semicolons (#2197)

* MOD-18913 - Pin the RLTest fix for escaped semicolons in moduleArgs

The plain-string branch of fix_modulesArgs reuses the raw input instead of
the unescaped split, so an escaped semicolon reaches the module with its
backslash. test_globalconfigs passes COMPACTION_POLICY that way, the module
then fails to load, the server never starts, and the test reports only
Connection refused against the Env it just built - on gen, slaves, aof and
aof_slaves.

Fixed upstream in RLTest#256; pinned to that commit until it merges.

Co-Authored-By: Claude Opus 5 <[email protected]>

* Trigger CI

* Point the pin at upstream RLTest now that the fix has merged

RedisLabsModules/RLTest#256 merged as 7e9f69ac1, so the escaped-semicolon fix is
available upstream and the pin no longer has to reference a fork. Same code
either way - 8dc964e was that PR's head - so this changes nothing in CI, it just
stops the branch from merging with a personal fork as a dependency.

* Spell the RLTest pin as a full SHA

An abbreviated SHA only resolves while the commit stays reachable from the
default branch, because a git fetch of a specific object needs the full hash and
an abbreviation is resolved after the clone. It works today - CI on the previous
commit passed - but it is a needless dependency on that reachability, and the
pin this replaced was a full SHA. Same commit either way.

Raised by Cursor Bugbot on 965b2db.

---------

Co-authored-by: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker-image-changes Force CI to build Docker images locally instead of pulling prebuilt registry images.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants