Skip to content

Add filtering by health and state in list rules #6040

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 2 commits into from
Jul 9, 2024

Conversation

euniceek
Copy link
Contributor

@euniceek euniceek commented Jun 26, 2024

What this PR does:

This PR adds two additional filtering fields to the list rules API. If users want to list rules that are in firing state or healthy, they will be able to do it using the following parameters.

  • api/v1/rules?state=firing
  • api/v1/rules?health=ok

Checklist

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

@euniceek euniceek force-pushed the implement-listrules-filtering branch from 3a39004 to 2e003fb Compare June 26, 2024 00:02
@euniceek euniceek force-pushed the implement-listrules-filtering branch from 2e003fb to f182009 Compare June 27, 2024 22:06
@pull-request-size pull-request-size bot added size/M and removed size/L labels Jun 27, 2024
@euniceek euniceek force-pushed the implement-listrules-filtering branch from f182009 to aefd0ae Compare June 27, 2024 22:06
@euniceek euniceek marked this pull request as ready for review June 27, 2024 22:34
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

It looks good to me. Thanks!

@yeya24
Copy link
Contributor

yeya24 commented Jun 28, 2024

@euniceek Can you please update the PR description? I don't think Cortex supports ruleinfo API

@euniceek
Copy link
Contributor Author

euniceek commented Jul 2, 2024

@euniceek Can you please update the PR description? I don't think Cortex supports ruleinfo API

Thanks for the review! Updated!

@yeya24
Copy link
Contributor

yeya24 commented Jul 2, 2024

Let's wait for another approval from a maintainer before merging this.

@yeya24
Copy link
Contributor

yeya24 commented Jul 2, 2024

@euniceek Can you also update the changelog? We can call it an enhancement

@euniceek euniceek force-pushed the implement-listrules-filtering branch from 5dc7427 to a3578f0 Compare July 2, 2024 17:31
@alanprot
Copy link
Member

alanprot commented Jul 9, 2024

ok.. LGTM!

@euniceek euniceek force-pushed the implement-listrules-filtering branch from a3578f0 to 2e74e23 Compare July 9, 2024 20:14
@yeya24 yeya24 merged commit 6f5fab7 into cortexproject:master Jul 9, 2024
16 checks passed
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