-
Notifications
You must be signed in to change notification settings - Fork 24
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
r/burn_alert: Add support for budget rate burn alerts #391
Conversation
9b3ce22
to
08d2b05
Compare
bf4fdbd
to
e66c1b7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #391 +/- ##
==========================================
+ Coverage 80.81% 80.82% +0.01%
==========================================
Files 56 62 +6
Lines 4565 4809 +244
==========================================
+ Hits 3689 3887 +198
- Misses 722 768 +46
Partials 154 154 ☔ View full report in Codecov by Sentry. |
e66c1b7
to
728c093
Compare
beb2340
to
fa7b8bc
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.
Just took another quick pass, but this is coming together great. Thanks for the care in crafting such thorough tests
e3aa6ad
to
256ee69
Compare
…ages in r/slo with equivalent helpers from internal/helper
…r of places past the decimal point
e57ebf1
to
8209221
Compare
8209221
to
215ddc0
Compare
value: types.Float64Value(123), | ||
maxPrecision: 2, | ||
}, | ||
// trailing zeros won't impact the conversion from percent to ppm so there's no need to fail |
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.
✨
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.
🚀
215ddc0
to
f6ebbc7
Compare
Short description of the changes
This PR adds support for budget rate burn alerts to the burn alert resource.
How to verify that this has the expected result
Pre-requisites:
Setup:
providers
somewhere you can easily access (but not inside the same folder as your Terraform config).make build
providers
directory you created earlier.main.tf
in your new directory. You'll be modifying it in the steps below.terraform init
.Provision resources for r/burn_alert:
terraform apply
. This should succeed and if you check in the UI, you should see the burn alerts you just created.terraform plan
. There should be no changes.Check that upgrading provider version doesn't break anything:
terraform plan
. This time you should see a yellow warning block telling you that development overrides are in place. It should look like this:Check that validation works:
terraform apply
. This should succeed and if you check in the UI, you should see the 2 new burn alerts you just created.alert_type
exhaustion_minutes
specifiedexhaustion_minutes
< 0budget_rate_window_minutes
< 60 or > the SLO's time periodbudget_rate_decrease_percent
< 0.0001 or > 100budget_rate_decrease_percent
with more than 4 non-zero digits past the decimalexhaustion_minutes
specifiedterraform apply
. This should fail and you should see descriptive errors about what attributes have been misconfigured.Check that updating burn alerts works:
alert_type
,exhaustion_minutes
,budget_rate_window_minutes
, orbudget_rate_decrease_percent
. Examples of useful scenarios to test out:alert_type
exhaustion_minutes
= 0terraform apply
. The output should show the changes you made in the config. After confirming, you should see these changes reflected in the UI.terraform plan
. Your plan should show no changes.Check that destroy works
terraform destroy
. This should succeed. You should see these changes reflected in the UI.Check that a fresh create works
terraform apply
. This should succeed. You should see these changes reflected in the UI.Related links