amazon.aws
amazon.aws copied to clipboard
cloudwatch_metric_alarm: fix idempotency for alarm without dimensions
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
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/11de4804995c49bb8a2e7851073d2fcc
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 53s :heavy_check_mark: build-ansible-collection SUCCESS in 14m 37s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 32s :heavy_check_mark: integration-amazon.aws-1 SUCCESS in 9m 54s Skipped 43 jobs
@gravesm Is there anything I can do to get someone to review this PR + the related issue it solves? Thanks in advance.
Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/975ec4cffb004ddeb7729fc193fcd3ed
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 17s :heavy_check_mark: build-ansible-collection SUCCESS in 15m 14s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 27s :x: integration-amazon.aws-1 FAILURE in 5m 20s Skipped 43 jobs
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/0e0287eed6ca4bf4923bdf4764a5af0f
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 45s :heavy_check_mark: build-ansible-collection SUCCESS in 14m 01s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 53s :heavy_check_mark: integration-amazon.aws-1 SUCCESS in 6m 46s Skipped 43 jobs
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. https://ansible.softwarefactory-project.io/zuul/buildset/064c77a449524406866b2bbd3b1e72e2
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 25s :heavy_check_mark: build-ansible-collection SUCCESS in 14m 23s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 37s :heavy_check_mark: integration-amazon.aws-1 SUCCESS in 8m 45s Skipped 43 jobs
Hi @GomathiselviS thank you for taking the time to review my PR. I've added the assertion task and merge the latest main commits into the branch. Could you please assist me with the changelog? In which file/directory should I place this? Thanks in advance!
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/a8fec7de4f0449959f9d0daa41727def
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 5m 15s :heavy_check_mark: build-ansible-collection SUCCESS in 15m 06s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 31s :heavy_check_mark: integration-amazon.aws-1 SUCCESS in 10m 43s Skipped 43 jobs
Hi @GomathiselviS thank you for taking the time to review my PR. I've added the assertion task and merge the latest main commits into the branch. Could you please assist me with the changelog? In which file/directory should I place this? Thanks in advance!
This an example of a changelog fragment. You can create one for your fix. The category of your fix will be one of these
Hi @GomathiselviS thank you for taking the time to review my PR. I've added the assertion task and merge the latest main commits into the branch. Could you please assist me with the changelog? In which file/directory should I place this? Thanks in advance!
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. https://ansible.softwarefactory-project.io/zuul/buildset/04ca17bc52b54c4ab1b23a4c22d3e422
:heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 21s :heavy_check_mark: build-ansible-collection SUCCESS in 14m 16s :heavy_check_mark: ansible-test-splitter SUCCESS in 5m 23s :heavy_check_mark: integration-amazon.aws-1 SUCCESS in 9m 49s Skipped 43 jobs