Commit Graph

3 Commits

Author SHA1 Message Date
Alaister Young
c6435f1cbe fix(studio): hide shared pooler chart for high availability projects (#49904)
High Availability projects run Multigres and don't have Supavisor, so
the Shared Pooler (Supavisor) client connections chart in the database
report only ever rendered an "Unable to load data" error for them. This
hides the chart for HA projects, following the same pattern as the Disk
IO Burst Balance chart.

**Changed:**
- `supavisor-connections-active` chart is now hidden when
`project.high_availability` is true

**Added:**
- Unit tests covering the shared pooler chart's visibility for standard,
HA, and unentitled projects

## To test

- Open Reports → Database on a High Availability project – the Shared
Pooler (Supavisor) client connections chart should no longer appear
- Open the same report on a standard Pro project – the chart should
still render as before

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* The active connection chart is now hidden for High Availability
projects and projects without the database entitlement, preventing empty
or unavailable data from being displayed.

* **Tests**
* Added coverage to verify the chart appears only for eligible standard
projects.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-09-02 21:25:16 +08:00
Alaister Young
23949ae633 [MUL-1364] fix(studio): use multipooler copy for dedicated pooler chart on HA (#49525)
The "Dedicated Pooler Client Connections" chart on the Database
observability page labels its series `pgbouncer` and links to PgBouncer
limits docs. High Availability projects run Multigres, whose dedicated
pooler is multipooler, so that copy was misleading. This swaps the copy
for HA projects and drops the docs link until multipooler docs exist
(per the ticket, disabling the link for now is fine).

**Changed:**
- HA projects: legend label `pgbouncer` → `multipooler`, series tooltip
→ "Multipooler connections"
- HA projects: the info icon shows a "docs coming soon" tooltip instead
of linking to the compute-and-disk limits docs
- Non-HA projects are unchanged

**Added:**
- Unit test for `getReportAttributesV2` covering both the PgBouncer and
multipooler branches

Out of scope (flagging for follow-up): the "Max pooler connections"
reference line still uses the PgBouncer value on HA projects, and the
Supavisor chart still renders for HA projects.

Addresses
https://linear.app/supabase/issue/MUL-1364/database-dashboard-update-dedicated-poolers-copy

## To test

- On a High Availability project, open Observability → Database and find
"Dedicated Pooler Client Connections"
- Legend and hover tooltip should say `multipooler`; the info icon
should show a tooltip ending in "(docs coming soon)" with no link
- On a non-HA project, the chart should be unchanged: `pgbouncer` legend
and the info icon links to the compute-and-disk docs

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- High Availability projects now display dedicated connection pooler
charts with multipooler-specific labels and guidance.
- Standard projects continue to show PgBouncer information and
documentation links.
- High Availability charts include a tooltip indicating that
documentation is coming soon.

- **Tests**
- Added coverage to verify the correct chart labels, tooltips, and
documentation behavior for both project types.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-08-25 08:38:41 +00:00
Alaister Young
0b37f0edc1 [MUL-1347] fix(studio): hide Disk IO Burst Balance chart for HA projects (#49527)
Hides the Disk IO Burst Balance chart on the Database observability page
for High Availability projects. Their volumes have no burst credit pool,
so the panel had nothing to load and rendered "Unable to load data for
Disk IO Burst Balance".

**Changed:**
- `getReportAttributesV2` now also requires
`!resolveHighAvailability(project)` before showing the
`disk-io-burst-balance` chart – the existing feature flag and
`hasBurstableIO` gating are unchanged for non-HA projects

**Added:**
- Unit tests covering the chart's visibility across HA / flag / compute
size combinations

## To test

- On a High Availability project with the `showDiskIOBurstBalanceChart`
flag on, open `/project/[ref]/observability/database` – the Disk IO
Burst Balance panel should no longer render
- On a non-HA project with a burstable compute size (e.g. micro) and the
flag on, the panel should still render as before

Addresses
https://linear.app/supabase/issue/MUL-1347/remove-panel-from-database-dashboard

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Hid the Disk I/O Burst Balance chart for High Availability projects,
where no burst-credit data is available.
* Continued hiding the chart when burst balancing is unsupported or
disabled.

* **Tests**
* Added coverage for eligible projects and scenarios where the chart
should remain hidden.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-08-25 16:22:25 +08:00