Skip to content

fix(workbench): do not block TimeSeries under ACL module detection failure#6232

Open
trippyogi wants to merge 4 commits into
redis:mainfrom
trippyogi:fix/5357-acl-timeseries-modules
Open

fix(workbench): do not block TimeSeries under ACL module detection failure#6232
trippyogi wants to merge 4 commits into
redis:mainfrom
trippyogi:fix/5357-acl-timeseries-modules

Conversation

@trippyogi

@trippyogi trippyogi commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Skip Workbench ModuleNotLoaded when a module command already succeeded (ACL users can run TS.RANGE while module discovery fails).
  • Fall back to HELLO for module detection when MODULE LIST / COMMAND INFO are unavailable; prefer HELLO over misparsed INFO Modules lines.
  • Add ts.range / ts.revrange to TimeSeries probe commands.

Fixes #5357

Test plan

  • Unit: database-info.provider specs (HELLO fallback + collapsed INFO modules)
  • Local Bugbot: clean after HELLO/INFO and ModuleNotLoaded fixes
  • ACL Redis user (+@READ + TS.RANGE, no MODULE LIST / COMMAND INFO): Workbench TS.RANGE returns data (not Time series unavailable)
  • Full-access user: TimeSeries / Search Workbench still works
  • Plain Redis (no modules): failed TS.* still shows ModuleNotLoaded guidance

Note

Medium Risk
Changes module discovery fallbacks and Workbench error heuristics; behavior shifts for restricted ACL connections but successful commands are preserved and failed module commands should still show guidance.

Overview
Fixes Workbench showing Time series unavailable for ACL users who can run TS.RANGE but lack MODULE LIST / COMMAND INFO, so successful TimeSeries replies are no longer replaced by ModuleNotLoaded when execution status is success.

Backend: After COMMAND INFO probing fails, module discovery now falls back to HELLO (preferred) and then INFO, with normalization that ignores collapsed INFO module: lines. TimeSeries probe commands now include ts.range and ts.revrange.

UI: CommonErrorResponse only runs module-missing checks when the result is not successful; group-mode rendering passes { status, response } so array replies (e.g. TS.RANGE) are not mistaken for errors.

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

…er ACL

Skip the module gate when the command succeeded or modules are unknown, and
fall back to HELLO/INFO module detection when MODULE LIST and COMMAND INFO
are unavailable. Fixes redis#5357
Prefer HELLO for module discovery when MODULE LIST fails, and only suppress ModuleNotLoaded for successful command replies.
@trippyogi
trippyogi marked this pull request as ready for review July 17, 2026 22:21
@trippyogi
trippyogi requested a review from a team as a code owner July 17, 2026 22:21

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6eed2d8154

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +95 to +100
const isSuccessfulResult = Array.isArray(result)
? result.length > 0 &&
result.every(
(item) => item?.status === CommandExecutionStatus.Success,
)
: result?.status === CommandExecutionStatus.Success

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use group item status to suppress module guidance

When Workbench renders grouped results, QueryCardCliGroupResult calls CommonErrorResponse(item.id, item.command, item.response), so this new success check sees the Redis reply itself rather than the item.status. For a successful module command whose reply is an array, such as TS.RANGE, result.every(item => item?.status === 'success') is false because the array entries are data points, so an ACL connection with an empty/unknown modules list still replaces the successful grouped reply with ModuleNotLoaded. Pass the grouped command status or treat the wrapper result consistently before running checkUnsupportedModuleCommand.

Useful? React with 👍 / 👎.

Grouped results were handing CommonErrorResponse the raw Redis reply, so
successful TS.RANGE arrays looked like failures under ACL. Pass the
CommandExecutionResult wrapper so item.status is visible.
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.

[Bug]: TS commands like RANGE, REVRANGE do not work in workbench with ACL

1 participant