Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster-ui: handle partial response errors on the database details page #109432

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

THardy98
Copy link

@THardy98 THardy98 commented Aug 24, 2023

Part of: #102386

Demos (Note: these demos show this same logic applied to both the databases and database table pages as well):
DB-Console

This change applies the same error handling ideas from #109245 to the
database details page, enabling non-admin users to use the database
details page and providing better transparency to data fetching issues.

Errors encountered while fetching table details can be viewed via the
tooltip provided by the Caution icon at the table's name.
unavailable cells also provide a tooltip that displays the error
impacting that exact cell.

Release note (ui change): Non-admin users are able to use the database
details page.

@THardy98 THardy98 added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Aug 24, 2023
@THardy98 THardy98 requested review from a team August 24, 2023 14:52
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@THardy98 THardy98 changed the title Db details page partial err cluster-ui: handle partial response errors on the database details page Aug 24, 2023
@THardy98
Copy link
Author

Note: this is currently rebased on top of #109245, only the last commit is relevant for reviewers

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!
For the changes on this :lgtm: but only merged when everything is addressed on dependency PR and that one gets merged so you can rebase

Reviewed 12 of 12 files at r1, 1 of 1 files at r2, 10 of 10 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @THardy98)

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, found a mistake, other than then looks good

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @THardy98)


pkg/ui/workspaces/cluster-ui/src/api/sqlApi.ts line 169 at r3 (raw file):

  message = message.replace("run-query-via-api: ", "");
  if (message.includes(":")) {
    return message.substring(message.indexOf(":"));

index + 1, otherwise you will start with the :

Part of: cockroachdb#102386

This change applies the same error handling ideas from cockroachdb#109245 to the
database details page, enabling non-admin users to use the database
details page and providing better transparency to data fetching issues.

Errors encountered while fetching table details can be viewed via the
tooltip provided by the `Caution` icon at the table's name.
`unavailable` cells also provide a tooltip that displays the error
impacting that exact cell.

Release note (ui change): Non-admin users are able to use the database
details page.
@THardy98 THardy98 force-pushed the db_details_page_partial_err branch from 5569ffc to 001ca87 Compare September 11, 2023 14:47
@THardy98
Copy link
Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 11, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants