-
Notifications
You must be signed in to change notification settings - Fork 343
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
cloudwatchevent_rule should return false when there is no change done to the rule #1589
cloudwatchevent_rule should return false when there is no change done to the rule #1589
Conversation
@@ -433,6 +433,14 @@ def _rule_matches_aws(self): | |||
def _targets_to_put(self): | |||
"""Returns a list of targets that need to be updated or added remotely""" | |||
remote_targets = self.rule.list_targets() | |||
|
|||
# The self.targets have extra parameters, so scrub is used to |
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.
# The self.targets have extra parameters, so scrub is used to | |
# keys with none values must be scrubbed off of self.targets |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 38s |
@@ -51,6 +51,27 @@ | |||
assert: | |||
that: | |||
- event_rule_input_transformer_output.changed | |||
|
|||
- name: Create cloudwatch event rule with input transformer |
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.
- name: Create cloudwatch event rule with input transformer | |
- name: Create cloudwatch event rule with input transformer (idempotent) |
input_template: "<instance> is in state <state>" | ||
register: event_rule_input_transformer_output | ||
|
||
- name: Assert that input transformer event rule was created |
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.
- name: Assert that input transformer event rule was created | |
- name: Assert that no changes were made to the rule |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 27s |
…rule (trailing white spaces)
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 58s |
…hanges were made to the rule
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 3m 44s |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 03s |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 10s |
- name: Assert that no changes were made to the rule | ||
assert: | ||
that: | ||
- event_rule_input_transformer_output.changed |
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.
- event_rule_input_transformer_output.changed | |
- not event_rule_input_transformer_output.changed |
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.
changed should be false in this testcase.
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.
Alternatively
- event_rule_input_transformer_output.changed | |
- event_rule_input_transformer_output is not changed |
I believe in theory this is the 'preferred' way to reference changed as it's more natural.
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 17s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 32s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 41s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 07s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 10s |
@@ -0,0 +1,3 @@ | |||
--- | |||
bugfixes: | |||
- cloudwatchevent_rule - add scrub none inside the _targets_to_put method (https://github.com/ansible-collections/amazon.aws/pull/1589)." |
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.
The changelog should describe what the end user needs to know, functionaly, about the change, rather than the implementation details of the code. Something like
"Fixes changed status to report False when no change has been made. The module had incorrectly always reported a change."
But make sure it describes whatever scenario the wrong change status would have occurred for, if it wasn't always.
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 47s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 3m 57s |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1639 🤖 @patchback |
… to the rule (#1589) cloudwatchevent_rule should return false when there is no change done to the rule SUMMARY Fixes #1080 ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/cloudwatchevent_rule.py ADDITIONAL INFORMATION Reviewed-by: GomathiselviS Reviewed-by: Mark Chappell Reviewed-by: Jill R Reviewed-by: Alina Buzachis (cherry picked from commit 614b792)
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #1640 🤖 @patchback |
… to the rule (#1589) cloudwatchevent_rule should return false when there is no change done to the rule SUMMARY Fixes #1080 ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/cloudwatchevent_rule.py ADDITIONAL INFORMATION Reviewed-by: GomathiselviS Reviewed-by: Mark Chappell Reviewed-by: Jill R Reviewed-by: Alina Buzachis (cherry picked from commit 614b792)
… to the rule (#1589) (#1640) [PR #1589/614b792b backport][stable-6] cloudwatchevent_rule should return false when there is no change done to the rule This is a backport of PR #1589 as merged into main (614b792). SUMMARY Fixes #1080 ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/cloudwatchevent_rule.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
… to the rule (#1589) (#1639) [PR #1589/614b792b backport][stable-5] cloudwatchevent_rule should return false when there is no change done to the rule This is a backport of PR #1589 as merged into main (614b792). SUMMARY Fixes #1080 ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/cloudwatchevent_rule.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
SUMMARY
Fixes #1080
ISSUE TYPE
COMPONENT NAME
plugins/modules/cloudwatchevent_rule.py
ADDITIONAL INFORMATION