Skip to content

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

Open
trippyogi wants to merge 5 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 5 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 for ACL-restricted connections; behavior is covered by new unit tests but affects how module availability is inferred and displayed.

Overview
Fixes Workbench showing Time series unavailable for ACL users who can run TS.RANGE but lack MODULE LIST / COMMAND INFO, and improves backend module discovery in the same situations (#5357).

Workbench UI: CommonErrorResponse no longer maps successful commands to ModuleNotLoaded when execution status is success, even if the connected instance has no detected modules. Group-mode rendering passes { status, response } into that helper so array replies (e.g. TS.RANGE) are not mistaken for failures.

API module detection: After MODULE LIST fails, the flow still probes via COMMAND INFO; if that yields nothing, it adds a HELLO-first fallback (then INFO), with parsing that ignores INFO’s collapsed module: line. TimeSeries probes now include ts.range and ts.revrange.

Reviewed by Cursor Bugbot for commit 6920994. 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.
@pawelangelow

Copy link
Copy Markdown
Contributor

@trippyogi I haven't had a chance to review the PR in detail yet, but I noticed that the eslint and typecheck checks are currently failing. Could you please address those issues while the PR is waiting for review? Thanks!

Apply prettier formatting and assert group-mode fixture types so the PR does not introduce a new tsc baseline error.

@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: 6920994277

ℹ️ 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 +219 to +220
if (entries.some(([key]) => key === 'module')) {
return [];

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 Parse INFO module entries before returning none

When HELLO is blocked but INFO is allowed, Redis reports modules as module:name=timeseries,ver=... lines, and this repo's getInfo() parser collapses those into info.modules.module. This new branch discards that data entirely, so restricted ACL users in exactly that fallback path still get [] from determineDatabaseModulesUsingHelloOrInfo and Workbench continues to think TimeSeries is not loaded. Parse the collapsed module string (or fetch raw INFO modules) before giving up.

Useful? React with 👍 / 👎.

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

2 participants