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: prometheus rule overrides swaps whole list #1860

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

csatib02
Copy link
Member

@csatib02 csatib02 commented Nov 27, 2024

  • The Prometheus-rule override functionality was faulty, because the original implementation had a sequential override problem where each subsequent override would replace the previous one completely, rather than applying multiple overrides cumulatively.
  • The conditional check inside the Override() method doesn't actually prevent the method from returning a rule - it just conditionally modifies the rule.
  • These issues combined would lead to creating duplicate or unnecessary modified versions of all rules, while swapping the whole list every iteration, rather than selectively overriding only the rules that match specific criteria.

Fixes: #1842

@csatib02 csatib02 self-assigned this Nov 27, 2024
@pepov pepov merged commit 79361bb into master Nov 28, 2024
19 checks passed
@pepov pepov deleted the fix/prom-rules-override branch November 28, 2024 08:20
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.

Fluentd prometheusRulesOverride only work for the last override (last object in array)
3 participants