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

Fix(query-frontend): LokiCodec encode/decode works correctly with label values endpoint #6084

Merged
merged 1 commit into from
May 3, 2022

Conversation

kavirajk
Copy link
Contributor

@kavirajk kavirajk commented May 3, 2022

What this PR does / why we need it:

When encode/decode http.Request into querybase.Request we re-create request.Path.

Before this PR, both /labels/ and /labels/{name}/values endpoint was decoding into same URL path /labels/ before
forwarding to the querier. So it always returns label names as response.

This bug became visible after enabling all the middleware for /labels/{name}/values endpoint as well via #6072

Signed-off-by: Kaviraj kavirajkanagaraj@gmail.com

Which issue(s) this PR fixes:
Fixes # NA.

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

…el values endpoint

When encode/decode `http.Request` into `querybase.Request` we re-create request.Path.

Before this PR, both `/labels/` and `/labels/{name}/values` endpoint was decoding into same URL path `/labels/` before
forwarding to the querier. So it always returns label names as response.

This bug became visible after enabling all the middleware for `/labels/{name}/values` endpoint as well via #6072

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@kavirajk kavirajk requested a review from a team as a code owner May 3, 2022 09:05
Copy link
Contributor

@salvacorts salvacorts left a comment

Choose a reason for hiding this comment

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

LGTM

@kavirajk kavirajk merged commit 8b15632 into main May 3, 2022
@kavirajk kavirajk deleted the kavirajk/fix-label-values-endpoint-codec branch May 3, 2022 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants