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

bug(volume): return 400 error for invalid volume request #11313

Merged

Conversation

dannykopping
Copy link
Contributor

What this PR does / why we need it:
Making a request to the /volume{,_range} endpoints results in a 500 is a LogQL expression is given instead of the expected label matchers. The reason for this is that the error is not wrapped in such a way as to be interpreted by ClientHTTPStatusAndError correctly.

5xx responses from the querier are automatically retried, so any invalid request currently results in 5 retries which are unnecessary.

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping requested a review from a team as a code owner November 24, 2023 11:45
Copy link
Contributor

Trivy scan found the following vulnerabilities:

Copy link
Contributor

@MichelHollands MichelHollands left a comment

Choose a reason for hiding this comment

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

LGTM

@dannykopping dannykopping merged commit e523809 into grafana:main Nov 24, 2023
9 checks passed
@dannykopping dannykopping deleted the dannykopping/correct-err-volume-req branch November 24, 2023 14:20
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
**What this PR does / why we need it**:
Making a request to the `/volume{,_range}` endpoints results in a 500 is
a LogQL expression is given instead of the expected label matchers. The
reason for this is that the error is not wrapped in such a way as to be
interpreted by `ClientHTTPStatusAndError` correctly.

5xx responses from the querier are automatically retried, so any invalid
request currently results in 5 retries which are unnecessary.

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
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.

None yet

2 participants