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: Ensure disconnect error doesn't appear w/auth change on some pages #11905

Merged
merged 2 commits into from Jan 4, 2022

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Dec 22, 2021

We recently updated a bug were in certain configurations you could log in but the view of data would not be refreshed/re-requested using the new token that you logged in with. Details in #11681.

The approach in the mentioned PR was to use a client generated 401 error to cancel out all running blocking queries and immediately start them up again using the new token.

Unfortunately, on some pages where things can disappear whilst blocking on them (for instance a service might be deregistered whilst viewing the service detail page), we catch any errors and show a message saying the connection was lost for some reason. In some circumstances we get an error that we can safely ignore, and these are usually our client generated errors (such as our 429 errors which are produced when we force cancel a blocking query due to reaching our connection limit).

As we added a new client generated error code in the above PR (401) we should have also made sure to ignore that error code also, which is what this PR adds in a place that is somewhat 'global'.

@johncowen johncowen added type/bug Feature does not function as expected theme/ui Anything related to the UI backport/1.11 labels Dec 22, 2021
Copy link

@amyrlam amyrlam left a comment

Choose a reason for hiding this comment

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

Used ?w=1 lgtm!

Will get to the longer PR's in the new year

@vercel vercel bot temporarily deployed to Preview – consul January 4, 2022 14:47 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging January 4, 2022 14:47 Inactive
@johncowen johncowen merged commit 72e5d7e into main Jan 4, 2022
@johncowen johncowen deleted the ui/bugfix/disconnection-error branch January 4, 2022 14:55
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/538725.

@hc-github-team-consul-core
Copy link
Collaborator

🍒✅ Cherry pick of commit 72e5d7e onto release/1.11.x succeeded!

@hc-github-team-consul-core
Copy link
Collaborator

🍒❌ Cherry pick of commit 72e5d7e onto release/1.10.x failed! Build Log

@hc-github-team-consul-core
Copy link
Collaborator

🍒❌ Cherry pick of commit 72e5d7e onto release/1.9.x failed! Build Log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants