-
Notifications
You must be signed in to change notification settings - Fork 397
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
kinesis_stream: Don't mark kstreams changed
when no encryption actions taken
#27
kinesis_stream: Don't mark kstreams changed
when no encryption actions taken
#27
Conversation
I know the tests don't currently exist for the kinesis module, would you be willing to try and add some integration tests too? |
That seems like it would be a feature, not really related to this fix. Would prefer that be added as an issue to be taken on. I tend to make changes during work hours to support my employer's use of Ansible, not sure if I can justify adding tests! Do agree, it's a good idea though. |
Unfortunately I'm not familiar enough with Kinesis to be willing to +1 this without test suites. Let's see if we can get ansible/ansible#62114 cleaned up and pulled in. |
Thankyou Tremble! |
After some digging I suspect there's something more systemic wrong with the encryption pieces. All of the return values seem to change when encryption is being manipulated. This change on it's own looks sane (now I understand a little about the module). I'll probably poke the code more thoroughly once this change has landed. |
Any other steps I can take to get this merged? |
@Tyler-2 One quick thing while we wait on the integration tests please add a changelog fragment: https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to |
Added. |
This comment has been minimized.
This comment has been minimized.
Looks like something's a little funky with the unit tests here. Given the results of my integration testing I suspect the unit test is buggy rather than your code. |
changelog/fragments/27-kinesis_stream-do-not-mark-as-changed-no-enc-actions.yaml
Outdated
Show resolved
Hide resolved
The unit tests for this module pass on |
aee36ce
to
b0a009d
Compare
I've dug more into the unit tests. They're intrinsically flawed, they relied on find_stream returning a fixed value in check mode. (The failing test was failing because the test was bad, not the change - find_stream returned an unencrypted stream so no change should have been made) I've fixed up various additional issues with kinesis_stream and removed the unit tests, testing is now based on integration tests instead. |
eeb6e6c
to
6d49eb4
Compare
6d49eb4
to
9cb596a
Compare
changed
when no encryption actions takenchanged
when no encryption actions taken
9cb596a
to
29fe3b0
Compare
@Tyler-2 it's taken almost a year but your fix is finally merged! I'm sorry it's taken so long. Thanks for your PR. |
Hallelujah! Thanks Tremble for really keeping on it. |
…ons taken (ansible-collections#27) * fix: Don't mark kstreams `changed` when no encryption actions taken Fixes ansible/ansible#65928 * doc: add changelog fragment * Move disable_stream_encryption test to integration test * Update descriptions/fetch calls to still run on check_mode * use standard helpers to convert tags to/from boto3 format * use camel_dict_to_snake_dict helper * use standard compare_aws_tags helper * Fix tag handling and use standard helpers * Format results and add tags when manipulating encryption settings * Move kinesis_stream tests over to just integration tests * changelog * lint Co-authored-by: Tyler Schwend <[email protected]> Co-authored-by: Mark Chappell <[email protected]>
…ons taken (ansible-collections#27) * fix: Don't mark kstreams `changed` when no encryption actions taken Fixes ansible/ansible#65928 * doc: add changelog fragment * Move disable_stream_encryption test to integration test * Update descriptions/fetch calls to still run on check_mode * use standard helpers to convert tags to/from boto3 format * use camel_dict_to_snake_dict helper * use standard compare_aws_tags helper * Fix tag handling and use standard helpers * Format results and add tags when manipulating encryption settings * Move kinesis_stream tests over to just integration tests * changelog * lint Co-authored-by: Tyler Schwend <[email protected]> Co-authored-by: Mark Chappell <[email protected]>
…ons taken (ansible-collections#27) * fix: Don't mark kstreams `changed` when no encryption actions taken Fixes ansible/ansible#65928 * doc: add changelog fragment * Move disable_stream_encryption test to integration test * Update descriptions/fetch calls to still run on check_mode * use standard helpers to convert tags to/from boto3 format * use camel_dict_to_snake_dict helper * use standard compare_aws_tags helper * Fix tag handling and use standard helpers * Format results and add tags when manipulating encryption settings * Move kinesis_stream tests over to just integration tests * changelog * lint Co-authored-by: Tyler Schwend <[email protected]> Co-authored-by: Mark Chappell <[email protected]>
Fixes ansible/ansible#65928
SUMMARY
Fixes ansible/ansible#65928.
ISSUE TYPE
COMPONENT NAME
kinesis_stream
ADDITIONAL INFORMATION
Do a few extra conditional checks when running to avoid reporting changes if the stream already matches the desired configuration.