-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
cc3afaa
to
0a25643
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Steven 👋 thanks a lot for your contribution, I left a few minor comments.
@JohnnyQQQQ ready for re-review |
Thanks, the team member implementing this is currently on PTO and will take it from here as soon as he is back. |
Happy to implement / contribute more if pointed in the direction of need, just let me know :-) We're keen to codify our alarms in terraform. |
Hi Steven, I'm actively working on this and the terraform integration for all alerting resources 👋 For Terraform to work efficiently and be consistent with Prometheus, we need the ability to query all rules in a group. There's an open PR in the main grafana repo adding an endpoint for this. It's awaiting review: grafana/grafana#51398 Once that PR goes in, we will then need a method here wrapping the new endpoint, then the terraform integration will be unblocked and good to go. |
Hey Alex, thanks for the update. While implementing this I noticed that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more points of feedback. These are all fairly nitpicky, this contribution is looking great!
No need to worry about the GET/PUT rule group endpoints as part of this PR quite yet. I'm actively working on those endpoints and will add them as soon as they're supported.
"github.com/gobs/pretty" | ||
) | ||
|
||
func TestAlertRules(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent tests. Thanks!
@alexweav thanks, applied all your suggestions, I'll rebase and squash |
182ccdc
to
908919e
Compare
Good to go 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there - I think the tests need a couple touch-ups based on the rename suggestions + another pass with the auto-formatter, but otherwise this PR is good to go. Thanks!
908919e
to
07db8d7
Compare
Authored-by: Steven Richards <steven.richards@ookla.com> Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
07db8d7
to
61550ff
Compare
Well that's embarrassing 😅 fixed and go fmt'd. Thanks @alexweav |
Tagged to re-review to merge |
Intending to add this for terraform support.
--
Based this on the example data examples in the API spec, so open to better test JSON / examples.