Files
supabase/apps/studio/components/interfaces/Settings/Infrastructure/InfrastructureConfiguration
53e2c4f1d1 [FE-4809] fix(studio): group HA topology by shardRef (#52545)
Update HA topology grouping for the Multigres JSON field rename from
`shardKey` to `shardRef`, so separate shards retain their own primaries
and replicas.

**Changed:**
- Normalize pooler responses to `shardRef`, falling back to legacy
`shardKey` and preferring `shardRef` when both exist.
- Use `shardRef` in the topology selector and shard grouping.

**Added:**
- Regression coverage from response parsing through diagram node/edge
generation for new, legacy, mixed, and conflicting key formats, plus
omitted shard identity fields.

Addresses
https://linear.app/supabase/issue/FE-4809/update-studio-ha-topology-grouping-to-use-shardref

## To test

- Open Settings → Infrastructure on a multi-shard HA project returning
`shardRef`. Confirm one group per shard, each primary shown as Primary
Database, and replicas connected only to their own shard's primary.
- Check the same topology on Database → Pipelines.
- Confirm legacy `shardKey` responses still render correctly and
single-shard projects remain unchanged.

## Validation

- Passed: 33 targeted utility tests, ESLint on all changed files, Studio
TypeScript check, and diff whitespace checks.
- Local browser: login and non-HA infrastructure passed. HA grouping
remains unverified because local poolers/gateways endpoints returned
404; browser response mocking was blocked by cross-origin/CORS
limitations.
- Upstream multigres/multigres#1608 merged October 29; deployment of the
renamed field remains unconfirmed.

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-11-03 22:56:53 +08:00
..