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 invalid PrometheusRule when adding grouping to a ratio indicator #1021

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

LukeDAtkinson
Copy link

The rules here were being added to rule.Groups, even if we have had an ErrGroupingUnsupported error returned by the objective.GenericRules() function. This results in an empty rule being added to the PrometheusRule spec, which fails validation.

I just added an else branch so the rule is not added to the spec if an ErrGroupingUnsupported error has been raised.

I think this should fix #976.

@LukeDAtkinson
Copy link
Author

We are testing a version of Pyrra built from our fork for this pull request and it is able to create SLOs with grouping.

@metalmatze metalmatze merged commit b489c1f into pyrra-dev:main Feb 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid prometheus rule when trying to add grouping to SLO
3 participants