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

api: ensure v1/health/ingress/:service endpoint works properly when streaming is enabled #9967

Merged
merged 4 commits into from
Apr 5, 2021

Conversation

rboyer
Copy link
Member

@rboyer rboyer commented Apr 2, 2021

The streaming cache type for service health has no way to handle v1/health/ingress/:service queries as there is no equivalent topic that would return the appropriate data.

This PR ensures that attempts to use this endpoint will use the old cache-type for now so that they return appropriate data when streaming is enabled.

Manual backport to 1.9.x #9968

@rboyer rboyer added the type/bug Feature does not function as expected label Apr 2, 2021
@rboyer rboyer requested review from dnephin and a team April 2, 2021 21:08
@rboyer rboyer self-assigned this Apr 2, 2021
@github-actions github-actions bot added the theme/health-checks Health Check functionality label Apr 2, 2021
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 5, 2021 15:36 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 5, 2021 15:36 Inactive
rboyer added a commit that referenced this pull request Apr 5, 2021
…y when streaming is enabled

Backport of #9967 to 1.9.x
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Thank you for making this change! I think this roughly works, but moving it into the rpcclient/health.Client will ensure it is fixed in the right place for all callers.

I think when we chatted about it I suggested making the change in this spot, but now I realize that because we're having to switch the underlying cache, that isn't the case.

agent/health_endpoint.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 5, 2021 16:29 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 5, 2021 16:29 Inactive
@rboyer rboyer requested a review from dnephin April 5, 2021 16:29
Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM with the one suggestion

agent/health_endpoint_test.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 5, 2021 18:05 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 5, 2021 18:05 Inactive
@rboyer rboyer merged commit e494313 into master Apr 5, 2021
@rboyer rboyer deleted the fix-ingress-health-api branch April 5, 2021 18:23
rboyer added a commit that referenced this pull request Apr 5, 2021
…y when streaming is enabled (#9968)

Backport of #9967 to 1.9.x
@hashicorp-ci
Copy link
Contributor

🍒 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/345498.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/health-checks Health Check functionality type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants