Skip to content

fix(cloud): warn when a subscription's databases cannot be fetched in database list - #1322

Open
pcbeingused333 wants to merge 2 commits into
redis:mainfrom
pcbeingused333:fix/cloud-database-list-partial-errors
Open

pcbeingused333 wants to merge 2 commits into
redis:mainfrom
pcbeingused333:fix/cloud-database-list-partial-errors

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

redisctl cloud database list silently dropped every database of a subscription whose /databases request failed (403, 5xx, timeout), so the output looked complete but was not.

Cause

  • list_databases in commands/cloud/database.rs fetched per-subscription databases with .get_raw(...).await.ok(), discarding the error for both flexible and fixed subscriptions.

Fix

  • Match on the result and print Warning: failed to fetch databases for subscription <id> (<name>): <error>; ... on stderr, then continue with the remaining subscriptions. stdout (JSON/table) is unchanged, and the exit code stays 0 to keep partial listings usable.

Tests

  • wiremock test: subscription 1 returns a database, subscription 2 returns 403; the list succeeds, includes the database from subscription 1, and stderr names subscription 2. Fails before the change, passes after.

Disclosure: this change was prepared with the help of an AI coding assistant (Claude Code).

pcbeingused333 and others added 2 commits November 7, 2026 01:22
… database list

cloud database list swallowed per-subscription fetch errors with .ok(), so
databases silently disappeared from the output. Print a warning on stderr
naming the subscription and error and keep listing the rest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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