Skip to content

fix(database): report the actual database status in list commands#2006

Merged
martin-helmich merged 1 commit into
masterfrom
fix/database-list-real-status
Jul 15, 2026
Merged

fix(database): report the actual database status in list commands#2006
martin-helmich merged 1 commit into
masterfrom
fix/database-list-real-status

Conversation

@martin-helmich

Copy link
Copy Markdown
Member

database mysql list displayed pending for a database that the API reported as migrating.

Cause

The status column did not use the status field returned by the API. It derived the value from the isReady boolean instead:

get: (row) => {
  if (!row.isReady) {
    return "pending";
  }
  return "ready";
},

DatabaseDatabaseStatus has five values — pending, ready, migrating, importing and error — so this collapsed everything that was not ready into pending. Besides migrating, this also affected error: a failed database was indistinguishable from one that is still being worked on.

The same code existed in database list, which had a second problem. DatabaseRedisDatabase has no isReady field, so Redis rows were hardcoded to isReady: true and always displayed as ready, whatever their actual state.

Fix

Both MySQL and Redis databases report status, so the column now uses it directly and the Redis isReady hardcode is gone. Since the column key already matches the field, the custom getter is no longer needed.

Verified against a mock serving all five states; each is now reported verbatim, and a pending Redis database no longer shows as ready.

Found while testing #2005, where an upgrade puts the database into migrating, but this is an independent pre-existing bug, hence the separate PR.

🤖 Generated with Claude Code

The status column was derived from the `isReady` boolean instead of the
status reported by the API, collapsing the five possible states into
"ready" and "pending". A database that was migrating, importing or in an
error state was therefore displayed as "pending", which is particularly
misleading for "error", as a failed database was indistinguishable from
one that is still being worked on.

RedisDatabases have no `isReady` field at all and were hardcoded to be
ready in "database list", so they always appeared as "ready" regardless of
their actual state. Both resources do report `status`, so use it directly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@martin-helmich
martin-helmich merged commit 2b17ba6 into master Jul 15, 2026
11 checks passed
@martin-helmich
martin-helmich deleted the fix/database-list-real-status branch July 15, 2026 14:10
mittwald-machine added a commit that referenced this pull request Jul 16, 2026
## [1.20.3](v1.20.2...v1.20.3) (2026-07-16)

### Bug Fixes

* **database:** report the actual database status in list commands ([#2006](#2006)) ([2b17ba6](2b17ba6)), closes [#2005](#2005)
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.

1 participant