-
Notifications
You must be signed in to change notification settings - Fork 342
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
cloudwatch_metric_alarm: fix idempotency for alarm without dimensions #1865
cloudwatch_metric_alarm: fix idempotency for alarm without dimensions #1865
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 53s |
@gravesm Is there anything I can do to get someone to review this PR + the related issue it solves? Thanks in advance. |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 5m 17s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 45s |
Hi @jmisset-cb Thank you for initiating this pull request. We are currently in the process of reviewing it. Kindly incorporate a changelog entry and perform a rebase of the PR. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 25s |
Hi @GomathiselviS thank you for taking the time to review my PR. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 15s |
This an example of a changelog fragment. You can create one for your fix. The category of your fix will be one of these |
I've added the changelog entry! Thanks again. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 21s |
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.
@jmisset-cb Thank you for taking time to work on this bugfix and for patience. Can you please rebase your Pull Request?
@alinabuzachis No worries, thank you for looking into this. I have rebased the PR. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 21s |
229b1f2
to
ebcfba4
Compare
Suggestion doesn't apply in this case.
ebcfba4
to
5757308
Compare
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 32s |
Pull request merge failed: Required status check "ansible/gate" is expected. |
5757308
to
db059ad
Compare
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 31s |
dc574ca
into
ansible-collections:main
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #2256 🤖 @patchback |
…#1865) SUMMARY A metric alarm in Cloudwatch can optionally have Dimensions. When a metric alarm in Cloudwatch does not have any dimensions, it returns: "Dimensions": [] when queried via boto3. When configuring a metric alarm without Dimensions in Cloudwatch using the cloudwatch_metric_alarm plugin, Dimensions must be absent from the parameters. Because "Dimensions": [] does not match Dimensions: None, the result is always Changed. This Pull Request fixes this by setting Dimensions from the returned alarm parameters to None when the field is empty. Fixes #1750 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatch_metric_alarm ADDITIONAL INFORMATION Reviewed-by: GomathiselviS Reviewed-by: Jasper Misset Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell (cherry picked from commit dc574ca)
…#1865) (#2256) This is a backport of PR #1865 as merged into main (dc574ca). SUMMARY A metric alarm in Cloudwatch can optionally have Dimensions. When a metric alarm in Cloudwatch does not have any dimensions, it returns: "Dimensions": [] when queried via boto3. When configuring a metric alarm without Dimensions in Cloudwatch using the cloudwatch_metric_alarm plugin, Dimensions must be absent from the parameters. Because "Dimensions": [] does not match Dimensions: None, the result is always Changed. This Pull Request fixes this by setting Dimensions from the returned alarm parameters to None when the field is empty. Fixes #1750 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatch_metric_alarm ADDITIONAL INFORMATION Reviewed-by: Mark Chappell
…ansible-collections#1865) SUMMARY A metric alarm in Cloudwatch can optionally have Dimensions. When a metric alarm in Cloudwatch does not have any dimensions, it returns: "Dimensions": [] when queried via boto3. When configuring a metric alarm without Dimensions in Cloudwatch using the cloudwatch_metric_alarm plugin, Dimensions must be absent from the parameters. Because "Dimensions": [] does not match Dimensions: None, the result is always Changed. This Pull Request fixes this by setting Dimensions from the returned alarm parameters to None when the field is empty. Fixes ansible-collections#1750 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatch_metric_alarm ADDITIONAL INFORMATION Reviewed-by: GomathiselviS Reviewed-by: Jasper Misset Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell
SUMMARY
A metric alarm in Cloudwatch can optionally have Dimensions. When a metric alarm in Cloudwatch does not have any dimensions, it returns: "Dimensions": [] when queried via boto3.
When configuring a metric alarm without Dimensions in Cloudwatch using the cloudwatch_metric_alarm plugin, Dimensions must be absent from the parameters.
Because "Dimensions": [] does not match Dimensions: None, the result is always Changed.
This Pull Request fixes this by setting Dimensions from the returned alarm parameters to None when the field is empty.
Fixes #1750
ISSUE TYPE
COMPONENT NAME
cloudwatch_metric_alarm
ADDITIONAL INFORMATION