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

Avoid creating alarms for zero thresholds #40

Conversation

adamantike
Copy link
Contributor

what

This change allows users to disable some of the alarms, by providing zero threshold.

why

At the moment, setting zero as threshold (e.g. to disable alarms on low CPU utilization) still creates the alarm, and incurs in CloudWatch cost for a no-op alarm.

@adamantike adamantike requested review from a team as code owners November 6, 2023 14:31
@joe-niland
Copy link
Member

@adamantike sorry for the delay in reviewing this! Practically, this looks fine to me, but do you think it could be a breaking change for some users?

@joe-niland joe-niland added the minor New features that do not break anything label Jan 24, 2024
@joe-niland joe-niland self-requested a review January 24, 2024 22:28
@joe-niland
Copy link
Member

@adamantike also it looks like the workflows may be out of date. Would you mind running:

make init
make github/init
make readme

Thanks

@adamantike
Copy link
Contributor Author

I just updated the workflows and Readme, thanks for the heads up!

I don't consider this a breaking change, but a fix instead. Threshold variables are positive integers by default, so this code will only affect users that have explicitly set them as zero.

For those users, I assume zero is being used to disable the alarm for the low thresholds, as they wouldn't be triggering with the current implementation in main. For high thresholds, setting it as zero shouldn't be common, as the alarm would be consistenly triggered.

@adamantike
Copy link
Contributor Author

@joe-niland, gentle ping. Let me know if there's anything else I can do to move this forward.

@joe-niland
Copy link
Member

/terratest

@joe-niland
Copy link
Member

@adamantike Waiting on #41 so the tests will run

@hans-d
Copy link

hans-d commented Mar 4, 2024

@adamantike @joe-niland is merged. Can you update this pr ?

This change allows users to disable some of the alarms, by providing
zero threshold.

At the moment, setting zero as threshold (e.g. to disable alarms on low
CPU utilization) still creates the alarm, and incurs in CloudWatch cost
for a no-op alarm.
@adamantike adamantike force-pushed the fix/avoid-creating-alarms-for-zero-thresholds branch from 4c22357 to f1d499f Compare March 12, 2024 13:00
Copy link

mergify bot commented Mar 12, 2024

Thanks @adamantike for creating this pull request!

A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

While you wait, make sure to review our contributor guidelines.

Tip

Need help or want to ask for a PR review to be expedited?

Join us on Slack in the #pr-reviews channel.

@adamantike
Copy link
Contributor Author

Just rebased this PR!

Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

LGTM

@Gowiem
Copy link
Member

Gowiem commented Mar 12, 2024

/terratest

@Gowiem Gowiem enabled auto-merge (squash) March 12, 2024 16:24
@Gowiem Gowiem merged commit 5de03ef into cloudposse:main Mar 12, 2024
11 checks passed
@adamantike adamantike deleted the fix/avoid-creating-alarms-for-zero-thresholds branch March 12, 2024 16:59
@rkul
Copy link

rkul commented May 15, 2024

Could someone clarify when it is going to be released?

@Gowiem
Copy link
Member

Gowiem commented May 15, 2024

Ah @rkul this should have already been released, but seems there is an issue with our automation. We'll look into it. I'll circle back.

@rkul
Copy link

rkul commented May 20, 2024

@Gowiem hello! Just wanted to kindly ask do you have any updates here?

@GabisCampana
Copy link

@goruha

@adamantike
Copy link
Contributor Author

I can see version 0.13.0 has been released 5 days ago. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants