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 routing tab is always shown when connect enabled #8209

Merged
merged 1 commit into from Jul 1, 2020

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Jun 30, 2020

Currently we can only tell if connect is disabled on a datacenter by detecting a 500 error from a connect related endpoint.

In #8065 we attempted to reduce the amount of times that the UI requests the discovery chain endpoint when connect is disabled on a datacenter.

In the above PR (present in Consul 1.8.0) we mistakenly returned from a catch instead of rethrowing the error, which meant that when a 500 error was caught, the discovery chain data would be removed. Whilst at first glance this doesn't seem like a big problem due to the endpoint erroring, but we also receive a 0 status errors when we abort endpoints during blocking queries. This means that in certain cases we can replace cached data for the discovery chain with undefined which will not get replaced until the blocking query responds again. From a user perspective, this can result in the Routing tab being hidden in certain situations.

This PR replaces the return with a throw, which means that other errors are dealt with correctly via the blocking query error detection/logic.

In the meantime, a page refresh will bring back the routing tab and visualisation when it has been removed.

In #8065 we attempted to reduce
the amount of times that the UI requests the discovery chain endpoint
when connect is disabled on a datacenter.

Currently we can only tell if connect is disabled on a datacenter by
detecting a 500 error from a connect related endpoint.

In the above PR we mistakenly returned from a catch instead of
rethrowing the error, which meant that when a none 500 error was caught
the discovery chain data would be removed. Whilst at first glance this
doens't seem like a big problem due to the endpoint erroring, but we
also receive a 0 error when we abort endpoints during blocking queries.
This means that in certain cases we can remove cached data for the
discovery chain and then delay reloading it via a blocking query.

This PR replaces the return with a throw, which means that everything is
dealt with correctly via the blocking query error detection/logic.
@johncowen johncowen added type/bug Feature does not function as expected theme/ui Anything related to the UI backport/1.8 labels Jun 30, 2020
@johncowen johncowen added this to the 1.8.x milestone Jun 30, 2020
@johncowen johncowen requested a review from kaxcode June 30, 2020 11:39
Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

:shipit:

@johncowen johncowen merged commit 07b49f8 into master Jul 1, 2020
@johncowen johncowen deleted the ui/bugfix/always-show-routing-tab branch July 1, 2020 09:21
@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit 07b49f8 onto release/1.8.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Jul 1, 2020
In #8065 we attempted to reduce
the amount of times that the UI requests the discovery chain endpoint
when connect is disabled on a datacenter.

Currently we can only tell if connect is disabled on a datacenter by
detecting a 500 error from a connect related endpoint.

In the above PR we mistakenly returned from a catch instead of
rethrowing the error, which meant that when a none 500 error was caught
the discovery chain data would be removed. Whilst at first glance this
doens't seem like a big problem due to the endpoint erroring, but we
also receive a 0 error when we abort endpoints during blocking queries.
This means that in certain cases we can remove cached data for the
discovery chain and then delay reloading it via a blocking query.

This PR replaces the return with a throw, which means that everything is
dealt with correctly via the blocking query error detection/logic.
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