release-23.1: cluster-ui: handle partial response errors on the databases page #110342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #109245.
/cc @cockroachdb/release
Part of: #102386
Demos (Note: these demos show this same logic applied to both the database details and database table pages as well):
DB-Console
Prior to this change, any query error in the reponse payload for the
databases page would cause the page to render an error. This was
problematic as some queries used to power the databases page directly
query
system
tables, meaning onlyADMIN
users could access the page.This change allows the databases page to handle network responses with
query errors, consequently allowing non-admin users to view the data
they are privy to.
On the databases page, two types of requests are made:
The error handling for these requests has changed as such:
requesting database names, render a page error
names, render an alert that we're showing partial results
Caution
icon next to the database's name to indicate there was anissue getting results, the
Caution
icon has a tooltip providing ageneral explanation as to what the issue is
database's table row, consequently the row of statistics for that
database is
unavailable
, the network error message is provided in theCaution
icon tooltipcells for that query, which are
unavailable
unavailable
cells have a tooltip that highlight the error for thatcell as well
Note: the change in
planner.go
allows users to see span statistics for any table, not just tables a user hasSELECT
privileges for. This is particularly useful for the databases page where users need to see the span statistics for a database, but only haveSELECT
privileges on a subset of tables. Regardless, span statistics are gated byVIEWACTIVITY
, notSELECT
privileges.Release note (ui change): Allow non-admin users to view the databases
page.
Release justification: UI improvement (regression fix)