Skip to content

Backport MGET key specification and cluster CI fixes to 8.4 - #1652

Merged
AvivDavid23 merged 2 commits into
8.4from
cherry-pick-ac573d8e-to-8.4
Sep 28, 2026
Merged

AvivDavid23 merged 2 commits into
8.4from
cherry-pick-ac573d8e-to-8.4

Conversation

@AvivDavid23

@AvivDavid23 AvivDavid23 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Backports ac573d8 and c4e35c2 onto 8.4.

JSON.MGET reports every key before the trailing JSONPath argument. Regression coverage checks key extraction and command metadata; existing cluster fixtures use matching hash tags.

The CI prerequisite raises RLTest to ~= 0.7.29 and passes the cluster-bus protected-mode waiver to OSS cluster runs, including ENV_ONLY. Setting CLUSTER_BUS_PROTECTED_MODE= omits the option for older Redis builds.

The 8.4 backport uses legacy command registration in redis_json/src/lib.rs and places the key-extraction and legacy-metadata regression in tests/pytest/test.py.

Validation:

  • MGET regression reproduced before the fix; module build and 12 targeted runs passed across standalone, replicas, AOF, and OSS cluster.
  • CI prerequisite matches c4e35c2, preserving the legacy dependency filename where applicable.
  • git diff --check and bash syntax checks passed.
  • Protected-mode argument checks passed for unset, empty, no, and yes values.

Note

Medium Risk
JSON.MGET key-spec metadata affects ACL, key extraction, and cluster behavior; CI changes depend on Redis version for the cluster-bus protected-mode flag.

Overview
Fixes JSON.MGET legacy command registration so Redis treats every argument before the trailing JSONPath as keys (1,-2,1 instead of a single key), matching behavior like JSON.MSET and fixing COMMAND GETKEYS / cluster routing.

Adds testMgetKeySpec to assert COMMAND GETKEYS and COMMAND INFO metadata, and adjusts existing MGET fixtures to use consistent hash tags ({doc}:…, test_key1{test_key}) for cluster tests.

CI/test harness: bumps RLTest to ~= 0.7.29 and forwards --cluster_bus_port_protected_mode on OSS cluster runs (default no; set CLUSTER_BUS_PROTECTED_MODE= to skip on older Redis).

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

* MOD-18952 Fix MGET command key spec

* fix tests
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.01%. Comparing base (7d00e74) to head (82fb658).
⚠️ Report is 27 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #1652      +/-   ##
==========================================
- Coverage   77.56%   77.01%   -0.55%     
==========================================
  Files          16       15       -1     
  Lines        3945     3803     -142     
==========================================
- Hits         3060     2929     -131     
+ Misses        885      874      -11     

☔ 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.

…#1644)

* 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).

* Trigger CI to build the image locally, so it installs RLTest 0.7.29

* Set CLUSTER_BUS_ARGS before the ENV_ONLY branch can use it

run_env interpolates CLUSTER_BUS_ARGS for COORD=oss, but the ENV_ONLY branch
calls run_env and exits 20 lines before the assignment, so that path started
its cluster without the waiver and the shards refused to start on 8.12.

Moving the assignment above the branch; it depends on nothing in between.

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

---------

Co-authored-by: Claude Opus 5 <[email protected]>
@AvivDavid23 AvivDavid23 changed the title Cherry-pick: MOD-18952 Fix MGET command key spec (#1648) Backport MGET key specification and cluster CI fixes to 8.4 Sep 28, 2026
@AvivDavid23
AvivDavid23 merged commit dc5842e into 8.4 Sep 28, 2026
46 of 58 checks passed
@AvivDavid23
AvivDavid23 deleted the cherry-pick-ac573d8e-to-8.4 branch September 28, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants