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

ui: don't continue polling endpoints that return 403 errors #98521

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

abarganier
Copy link
Contributor

It was brought to our attention that endpoints such as v1/settings would continue to be polled by DB Console even if they returned 403 errors.

If an endpoint returns 403 errors, we should not continue to poll it since the required access is not present for the current user.

This patch updates the polling mechanism to short-circuit the refresh process if a 403 error is encountered throughout the lifecycle of the poller.

Release note: none

Fixes: #98356

@abarganier abarganier requested review from dhartunian and a team March 13, 2023 20:19
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

LGTM

It was brought to our attention that endpoints such as `v1/settings`
would continue to be polled by DB Console even if they returned
403 errors.

If an endpoint returns 403 errors, we should not continue to poll it
since the required access is not present for the current user.

This patch updates the polling mechanism to short-circuit the `refresh`
process if a 403 error is encountered throughout the lifecycle of the
poller.

Release note: none
@abarganier
Copy link
Contributor Author

TFTR!

bors r=dhartunian

@craig
Copy link
Contributor

craig bot commented Mar 14, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 14, 2023

This PR was included in a batch that was canceled, it will be automatically retried

@abarganier
Copy link
Contributor Author

bors retry

@craig craig bot merged commit a36d88b into cockroachdb:master Mar 14, 2023
@craig
Copy link
Contributor

craig bot commented Mar 14, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: console shows forbidden errors for requests to v1/settings
3 participants