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

Handle grpc code resource exhausted for store gateway #5286

Merged

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Apr 24, 2023

What this PR does:

Handle the gRPC response code change. Cortex querier should identify the error when we reach the limit and convert it into correct validation error.

Didn't add unit test, but I added an E2E test which should be able to ensure the correctness.

Which issue(s) this PR fixes:
Fixes #5285

Checklist

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

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 25, 2023

thanos-io/thanos#6316 seems another issue, so this pr I will only handle Series request and ignore series limit hit in LabelValues and LabelNames requests.

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24 yeya24 merged commit 2587e15 into cortexproject:master Apr 25, 2023
@yeya24 yeya24 deleted the handle-grpc-code-resource-exhausted branch April 25, 2023 17:14
@alvinlin123 alvinlin123 added this to the Release 1.15.1 milestone Apr 25, 2023
alanprot pushed a commit to alanprot/cortex that referenced this pull request Apr 26, 2023
…5286)

* handle grpc code resource exhausted for store gateway

Signed-off-by: Ben Ye <benye@amazon.com>

* fix lint

Signed-off-by: Ben Ye <benye@amazon.com>

* update changelog

Signed-off-by: Ben Ye <benye@amazon.com>

* try fixing test

Signed-off-by: Ben Ye <benye@amazon.com>

* try to fix E2E test

Signed-off-by: Ben Ye <benye@amazon.com>

* lint

Signed-off-by: Ben Ye <benye@amazon.com>

* try again

Signed-off-by: Ben Ye <benye@amazon.com>

* fix message

Signed-off-by: Ben Ye <benye@amazon.com>

* remove labels API

Signed-off-by: Ben Ye <benye@amazon.com>

* remove logic to check string contains

Signed-off-by: Ben Ye <benye@amazon.com>

* make limiter vars private

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
alanprot added a commit that referenced this pull request Apr 27, 2023
* Handle grpc code resource exhausted for store gateway (#5286)

* handle grpc code resource exhausted for store gateway

Signed-off-by: Ben Ye <benye@amazon.com>

* fix lint

Signed-off-by: Ben Ye <benye@amazon.com>

* update changelog

Signed-off-by: Ben Ye <benye@amazon.com>

* try fixing test

Signed-off-by: Ben Ye <benye@amazon.com>

* try to fix E2E test

Signed-off-by: Ben Ye <benye@amazon.com>

* lint

Signed-off-by: Ben Ye <benye@amazon.com>

* try again

Signed-off-by: Ben Ye <benye@amazon.com>

* fix message

Signed-off-by: Ben Ye <benye@amazon.com>

* remove labels API

Signed-off-by: Ben Ye <benye@amazon.com>

* remove logic to check string contains

Signed-off-by: Ben Ye <benye@amazon.com>

* make limiter vars private

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>

* Validating new fields on the PagerDuty AM config (#5290)

* Not Allowing to set the new  service_key_file and routing_key_file on AM config

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* changelog

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* fix multiples types

Signed-off-by: Alan Protasio <alanprot@gmail.com>

---------

Signed-off-by: Alan Protasio <alanprot@gmail.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Ben Ye <benye@amazon.com>
yeya24 added a commit to yeya24/cortex that referenced this pull request Apr 28, 2023
* Handle grpc code resource exhausted for store gateway (cortexproject#5286)

* handle grpc code resource exhausted for store gateway

Signed-off-by: Ben Ye <benye@amazon.com>

* fix lint

Signed-off-by: Ben Ye <benye@amazon.com>

* update changelog

Signed-off-by: Ben Ye <benye@amazon.com>

* try fixing test

Signed-off-by: Ben Ye <benye@amazon.com>

* try to fix E2E test

Signed-off-by: Ben Ye <benye@amazon.com>

* lint

Signed-off-by: Ben Ye <benye@amazon.com>

* try again

Signed-off-by: Ben Ye <benye@amazon.com>

* fix message

Signed-off-by: Ben Ye <benye@amazon.com>

* remove labels API

Signed-off-by: Ben Ye <benye@amazon.com>

* remove logic to check string contains

Signed-off-by: Ben Ye <benye@amazon.com>

* make limiter vars private

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>

* Validating new fields on the PagerDuty AM config (cortexproject#5290)

* Not Allowing to set the new  service_key_file and routing_key_file on AM config

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* changelog

Signed-off-by: Alan Protasio <alanprot@gmail.com>

* fix multiples types

Signed-off-by: Alan Protasio <alanprot@gmail.com>

---------

Signed-off-by: Alan Protasio <alanprot@gmail.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
yeya24 added a commit to yeya24/cortex that referenced this pull request Apr 28, 2023
…5286)

* handle grpc code resource exhausted for store gateway

Signed-off-by: Ben Ye <benye@amazon.com>

* fix lint

Signed-off-by: Ben Ye <benye@amazon.com>

* update changelog

Signed-off-by: Ben Ye <benye@amazon.com>

* try fixing test

Signed-off-by: Ben Ye <benye@amazon.com>

* try to fix E2E test

Signed-off-by: Ben Ye <benye@amazon.com>

* lint

Signed-off-by: Ben Ye <benye@amazon.com>

* try again

Signed-off-by: Ben Ye <benye@amazon.com>

* fix message

Signed-off-by: Ben Ye <benye@amazon.com>

* remove labels API

Signed-off-by: Ben Ye <benye@amazon.com>

* remove logic to check string contains

Signed-off-by: Ben Ye <benye@amazon.com>

* make limiter vars private

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.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.

Store gateway hits 422 limit but return 500 at query frontend
4 participants