Skip to content

fix response error to be ungzipped when status code is not 2xx #4975

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

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Nov 18, 2022

Signed-off-by: Ben Ye [email protected]

What this PR does:

Fix response to be ungzipped when status code is not 2xx. If status code is not 2xx, Prometheus returns error like while Cortex QFE returns the gzipped response. We should always ungzipped the body.

image (1)

image (2)

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yeya24 yeya24 marked this pull request as draft November 18, 2022 07:26
@yeya24 yeya24 changed the title fix response to be gzipped when status code is not 2xx fix response error to be ungzipped when status code is not 2xx Nov 18, 2022
Signed-off-by: Alan Protasio <[email protected]>
@pull-request-size pull-request-size bot added size/L and removed size/S labels Nov 18, 2022
Signed-off-by: Alan Protasio <[email protected]>
@yeya24 yeya24 marked this pull request as ready for review November 18, 2022 15:46
Signed-off-by: Alan Protasio <[email protected]>
@alanprot
Copy link
Member

Thanks!!!

@alanprot alanprot enabled auto-merge (squash) November 18, 2022 18:17
@alanprot alanprot merged commit bb8c097 into cortexproject:master Nov 18, 2022
alanprot added a commit to alanprot/cortex that referenced this pull request Nov 19, 2022
…xproject#4975)

* fix response to be gzipped when status code is not 2xx

Signed-off-by: Ben Ye <[email protected]>

* adding tests

Signed-off-by: Alan Protasio <[email protected]>

* lint

Signed-off-by: Alan Protasio <[email protected]>

* changelog

Signed-off-by: Alan Protasio <[email protected]>

Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Alan Protasio <[email protected]>
Co-authored-by: Alan Protasio <[email protected]>
alanprot added a commit that referenced this pull request Dec 3, 2022
* Release Preparation (#4969)

Signed-off-by: Alan Protasio <[email protected]>

Signed-off-by: Alan Protasio <[email protected]>

* fix response error to be ungzipped when status code is not 2xx (#4975)

* fix response to be gzipped when status code is not 2xx

Signed-off-by: Ben Ye <[email protected]>

* adding tests

Signed-off-by: Alan Protasio <[email protected]>

* lint

Signed-off-by: Alan Protasio <[email protected]>

* changelog

Signed-off-by: Alan Protasio <[email protected]>

Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Alan Protasio <[email protected]>
Co-authored-by: Alan Protasio <[email protected]>

* Bump RC version (#4979)

* Ready for 1.14 release (#5013)

Signed-off-by: Alan Protasio <[email protected]>
Signed-off-by: Ben Ye <[email protected]>
Co-authored-by: Ben Ye <[email protected]>
@yeya24 yeya24 deleted the fix-gzip-error branch January 3, 2023 18:45
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.

2 participants