Repository navigation
chore(studio): address review comments on Multigres topology diagram - #49592
Conversation
Follow-up to #49298. - Delete the unused `ha-cluster-cells-query.ts` and `ha-cluster-databases-query.ts` query modules. Neither file had a single importer anywhere in the repo, and neither `/cells` nor `/databases` is read by the topology diagram, so the query options and their zod schemas were dead code. Prune the now-orphaned `cells` and `databases` key factories from `haAdminKeys`. - Document the multipooler `lifecycleStatus` values Studio actually handles, in the same style as the neighbouring `type` and `servingStatus` fields, and note that unrecognised values fall through to the serving-status check. - Correct the `HA_POOLER_STATUS_LABELS` comment: the labels are a subset of the read replica status vocabulary, not a match for it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
🎭 Playwright Test Results (tanstack)Details
Flaky testsFeatures › wrappers.spec.ts › Stripe › can create a stripe wrapper with tables Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
There was a problem hiding this comment.
Preview test — ⚠️ incomplete coverage
| # | Test | Result |
|---|---|---|
| 1 | Settings → Infrastructure, HA topology | ✅ Multigateway (load balancer · 3 instances), Shard 1 automatic failover, Primary Database HEALTHY (cell-1 · m6g.large), two Read Replicas HEALTHY (cell-2, cell-3). No topology error. |
| 2 | Database → Replication, HA topology | ✅ Same cluster diagram. Header “High Availability cluster topology”. No topology error. |
| 3 | Dead cells/databases query modules gone; comment-only status docs |
⏭️ Not testable on the preview. |
Notes:
- No “To test” section, so 1–2 are inferred smokes of the topology surface this change sits under.
…es proto - Cite PoolerLifecycleStatus from multigres proto/clustermetadata.proto on the lifecycleStatus field instead of speculating about a FAILED value: the enum has no dedicated failure member, QUARANTINED is the terminal failure state - Note on the status labels and in getPoolerStatus that QUARANTINED/SHUTDOWN are the proto's only terminal states, surfaced as Unhealthy
…ivalence - Spell out that an unmapped future lifecycle value renders as Healthy via the servingStatus fall-through (SERVING is the proto3 zero value) - Reword the status label comment so it no longer denies and then names a Failed equivalent in the same sentence
|
That breaks 51 tests across 11 files ( Nothing in the failing log mentions No revert or fix for #49593 exists yet, so there is nothing to port into this branch. And since CI builds this head merged with current master, no commit here can turn it green — the fix has to land on master. Auto-merge will pick this up once it does. Generated by Claude Code |
|
Found 25 test failures on Blacksmith runners: Failures
...and 15 more test failures. View all on Blacksmith
|
Picks up the revert of #49593 (FormItemLayout item id) from master so CI runs against a base where the studio unit tests and E2E specs pass.
Braintrust eval report
|

![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light.png)
Requested by Alaister Young · Slack thread
Follow-up to #49298, which was squash-merged before @joshenlim's last review round was addressed. Picking up the review comments here.
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Chore — dead code removal and comment corrections. No behavior change.
What is the current behavior?
Three of @joshenlim's review comments on #49298 are still open on master:
ha-cluster-cells-query.ts— "seems to be dead code? no one's consuming this file"ha-cluster-databases-query.ts— "likewise - seems to be dead code"STATUS_BADGE_VARIANTSstatuses — "just to sanity check these are the only statuses? are there any failure states? e.g 'Failed'"Concretely, on master today:
apps/studio/data/ha-admin/ha-cluster-cells-query.tsandapps/studio/data/ha-admin/ha-cluster-databases-query.tsship query options that nothing imports. The diagram only reads/poolersand/gateways.multipoolerSchema.lifecycleStatusis an undocumentedz.string(), while its neighbourstypeandservingStatusboth list their expected proto values in a comment.HA_POOLER_STATUS_LABELSclaims the labels "Matches the status vocabulary of the read replica surfaces (getStatusLabel)". They don't —getStatusLabelinReadReplicas/ReadReplicas.utils.tsalso returnsFailed,Restarting,ResizingandRestoring, none of which the HA labels have.What is the new behavior?
cellsanddatabasesfactories fromhaAdminKeys, keepingpoolersandgateways. Verified by grep that neither file name nor any of their exported symbols (haClusterCellsQueryOptions,HaClusterCellsData,haClusterDatabasesQueryOptions,HaClusterDatabasesData, the*Variables/*Errortypes) norhaAdminKeys.cells/haAdminKeys.databaseshas a single reference left anywhere outside the deleted files. No re-export shims left behind.get-ha-admin.tsstays —poolersandgatewaysstill use it.lifecycleStatusagainst the actual enum,PoolerLifecycleStatusin multigresproto/clustermetadata.proto:LIFECYCLE_UNKNOWN(zero value, omitted from JSON) |STARTING|ACTIVE|STOPPING|SHUTDOWN|QUARANTINED.getPoolerStatusalready maps every member.HA_POOLER_STATUS_LABELScomment to say the labels are a subset drawn from the read replica vocabulary rather than a match for it, and noted where the read replicaFailedlands on the HA side.On the
Failedquestion: the answer from the proto is that there is no dedicated failure member. The terminal states areQUARANTINED— the pooler "has given up trying to become a healthy replica: it cannot automatically recover to a functioning state (e.g. it could not complete a pg_rewind, could not restore from backup to start postgres, or fell irrecoverably behind on replication)", kept alive for forensics — andSHUTDOWN, "durably down". Both already map tounhealthy/ theUnhealthywarning badge, so the four statuses onSTATUS_BADGE_VARIANTSare complete for the enum as it stands. If we'd rather showQUARANTINEDas its ownFailedstatus with a destructive badge (matching the read replica surface), that's a small follow-up — a product/copy call rather than a gap, so not folded in here.Not included: the replication page UX comment ("is there any other content we plan to add here? it feels empty atm... it's just a repeat of the home page + settings/infrastructure"). @joshenlim flagged that one himself as "UX feedback which can be addressed separately". It's a product and IA question about what that page is for, not something to answer with a code change here — leaving it for @alaister and design.
Additional context
tsc --noEmit(0 errors), ESLint on the touched files (clean), Prettier check (clean), andHaTopology.utils.test.ts+HaInstanceConfiguration.utils.test.ts(26/26 passing). CI is green as well.node_modules/.git/build output, coveringapps/**incl.lite-studio,packages/**ande2e/**) confirmed zero remaining references to the deleted files, their exported symbols, and the removed key factories.HaTopology.utils.test.tsalready pins everylifecycleStatusvalue listed in the new comment.Generated by Claude Code