-
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
cloudwatchevent_rule: Fix json input handling for input_template #1883
cloudwatchevent_rule: Fix json input handling for input_template #1883
Conversation
Build failed. ❌ ansible-galaxy-importer RETRY_LIMIT in 6m 59s |
5626f68
to
b9c18fb
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 47s |
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.
Would be nice to add some unit tests for this update
67baebc
to
0580119
Compare
there are integration tests for |
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.
I think it would be good to add both an integration test and an example in the module docs for a json input template.
Personally I'd stick to the integration tests for this change. The code is only consumed by this module, so adding unit tests is IMO "busy-work" that brings minimal value over the top of the integration tests. The only exception would be if they're handling hard to trigger edge cases. |
0580119
to
b8d55ad
Compare
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 59s |
b8d55ad
to
90aeda0
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 22s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 50s |
f364f35
to
11bbf5f
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 9m 21s |
11bbf5f
to
8a226b5
Compare
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 51s |
3b67513
into
ansible-collections:main
When will this be released? |
Backport to stable-7: 💚 backport PR created✅ Backport PR branch: Backported as #1968 🤖 @patchback |
cloudwatchevent_rule: Fix json input handling for input_template SUMMARY Fixes #1842 This PR Moves _snakify() out of class CloudWatchEventRule https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R213-R215 Fixes conditional in function _targets_to_put() to avoid wrong results due to _snakify() https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R461-R463 Updates code to add quotes " to input_template only when the given input is not JSON to avoid quotes being added to provided JSON input https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R452-R458 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatchevent_rule ADDITIONAL INFORMATION Reviewed-by: Bikouo Aubin Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Alina Buzachis Reviewed-by: Mandar Kulkarni <[email protected]> (cherry picked from commit 3b67513)
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #1969 🤖 @patchback |
cloudwatchevent_rule: Fix json input handling for input_template SUMMARY Fixes #1842 This PR Moves _snakify() out of class CloudWatchEventRule https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R213-R215 Fixes conditional in function _targets_to_put() to avoid wrong results due to _snakify() https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R461-R463 Updates code to add quotes " to input_template only when the given input is not JSON to avoid quotes being added to provided JSON input https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R452-R458 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatchevent_rule ADDITIONAL INFORMATION Reviewed-by: Bikouo Aubin Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Alina Buzachis Reviewed-by: Mandar Kulkarni <[email protected]> (cherry picked from commit 3b67513)
…) (#1968) [PR #1883/3b67513e backport][stable-7] cloudwatchevent_rule: Fix json input handling for input_template This is a backport of PR #1883 as merged into main (3b67513). SUMMARY Fixes #1842 This PR Moves _snakify() out of class CloudWatchEventRule https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R213-R215 Fixes conditional in function _targets_to_put() to avoid wrong results due to _snakify() https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R461-R463 Updates code to add quotes " to input_template only when the given input is not JSON to avoid quotes being added to provided JSON input https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R452-R458 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatchevent_rule ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
…) (#1969) [PR #1883/3b67513e backport][stable-6] cloudwatchevent_rule: Fix json input handling for input_template This is a backport of PR #1883 as merged into main (3b67513). SUMMARY Fixes #1842 This PR Moves _snakify() out of class CloudWatchEventRule https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R213-R215 Fixes conditional in function _targets_to_put() to avoid wrong results due to _snakify() https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R461-R463 Updates code to add quotes " to input_template only when the given input is not JSON to avoid quotes being added to provided JSON input https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R452-R458 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatchevent_rule ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
SUMMARY
Fixes #1842
This PR
Moves
_snakify()
out ofclass CloudWatchEventRule
https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R213-R215Fixes conditional in function
_targets_to_put()
to avoid wrong results due to_snakify()
https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R461-R463Updates code to add quotes
"
toinput_template
only when the given input is not JSON to avoid quotes being added to provided JSON input https://github.com/ansible-collections/amazon.aws/pull/1883/files#diff-3a2f223edc4e34ea28b9859827a830844d92a8cd97f1300a2d16b1703a083bc8R452-R458ISSUE TYPE
COMPONENT NAME
cloudwatchevent_rule
ADDITIONAL INFORMATION