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

feat(GrafanaAlertRuleGroup): add support for Grafana-managed recording rules #1881

Merged
merged 6 commits into from
Mar 6, 2025

Conversation

miinsun
Copy link
Contributor

@miinsun miinsun commented Mar 2, 2025

see #1862

I’ve added a new Record type to the GrafanaAlertRuleGroup Spec.
I’ve also updated the controller to handle From and Metric variables within the Record type.

Is there anything else I need to do???

Fixes: #1862

@CLAassistant
Copy link

CLAassistant commented Mar 2, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the documentation Issues relating to documentation, missing, non-clear etc. label Mar 2, 2025
Signed-off-by: miinsun <kor3334@naver.com>
@miinsun miinsun force-pushed the f/recorfing-rules branch from ee1ee4b to 9aaa10b Compare March 2, 2025 05:58
Copy link
Collaborator

@weisdd weisdd left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

This functionality is not activated by default in self-hosted / Enterprise Grafana and results in a failure to apply changes by the operator (when Record is passed).
Thus, it'd be great to have a full example added to examples/ including the feature toggle and related configuration.
Also, an e2e-test would be handy to make sure we catch failures should the Grafana API change in future.

@miinsun
Copy link
Contributor Author

miinsun commented Mar 3, 2025

Thanks for your feedback;) Looks like I missed adding the test code. I'll update the PR soon with the example and e2e test as you suggested.

miinsun added 2 commits March 5, 2025 21:40
Signed-off-by: miinsun <kor3334@naver.com>
Signed-off-by: miinsun <kor3334@naver.com>
@sachinjkattoor
Copy link

Thanks a lot @miinsun . @weisdd looking forward to getting this released :) Super excited that this will help to avoid a lot of manual effort

@weisdd weisdd changed the title feat: add Record field to GrafanaAlertRuleGroupSpec feat(GrafanaAlertRuleGroup): add support for Grafana-managed recording rules Mar 6, 2025
@weisdd weisdd force-pushed the f/recorfing-rules branch from 24ae554 to f97a428 Compare March 6, 2025 09:48
Copy link
Collaborator

@weisdd weisdd left a comment

Choose a reason for hiding this comment

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

@miinsun Thanks for the update. I've pushed a few changes to your branch (feature toggle configuration was missing, test data needed to be added to a different file). For the rest, it should be good to be merged.

@theSuess any closing thoughts? (e.g. whether we should keep the recording rule example in a different folder)

@theSuess
Copy link
Member

theSuess commented Mar 6, 2025

Happy with merging this as-is and updating docs later on

@theSuess theSuess added this pull request to the merge queue Mar 6, 2025
@theSuess theSuess added this to the v5.17.0 milestone Mar 6, 2025
Merged via the queue into grafana:master with commit 24bd140 Mar 6, 2025
29 checks passed
@miinsun
Copy link
Contributor Author

miinsun commented Mar 8, 2025

It was my first time using Chainsaw, and honestly, I struggled with writing test cases. But now I see how it should be done—it looks great! I learned a lot while reviewing your code. Thanks @weisdd

@weisdd weisdd added the feature this PR introduces a new feature label Mar 10, 2025
@sachinjkattoor
Copy link

@theSuess @weisdd As I understand v5.17.0 was scheduled to release yesterday but I do also see a last open PR (#1818) for this milestone.

Any rough idea on when the v5.17.0 release can be/would be done?

@weisdd
Copy link
Collaborator

weisdd commented Mar 11, 2025

@sachinjkattoor It's expected to happen today.

@theSuess theSuess removed the documentation Issues relating to documentation, missing, non-clear etc. label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature this PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RecordingRules support
5 participants