-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add ResourceType on ec2 snapshot copy #1419
Add ResourceType on ec2 snapshot copy #1419
Conversation
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.
Hi @bplaxco,
Thanks for taking the time to submit this PR. The change itself looks correct, however I'd ask for two minor additions:
- Please add a changelog fragment: https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to
- (optional) It would be really good if you could add an integration test. These are (in essence) just an an Ansible role which try to systematically exercise the module to test it behaves as expected, and live in
tests/integration/targets/
. A good starting point might be https://github.com/ansible-collections/amazon.aws/tree/main/tests/integration/targets/ec2_snapshot from the amazon.aws collection
Changelog fragment added. Looking into the tests. |
@tremble in the zuul ouput I get: "error": {
"code": "UnauthorizedOperation",
"message": "You are not authorized to perform this operation. Encoded authorization failure message: SZOho26QkeN31KcOxBTUnC_sBSeRa3G9qqAmqJOLtkkAiUvLcOIlJVojSNLkyZa7MXEHWbTOAtc5aemsWR_tKiqEZtwr5OlwXk4PbtKTtj0NdpDaBeDs1q-Mpt7zDktDjJmk41tSPe-Rjjqe1ftFJhuZ76rQKHOXEeLol1QsaW2kA9x74EEf6gbr13kMUi2CyF3D-XTFMLkpZj-XShxzE9QbF1xvmnvwxIbmwuVk0PWFUX8dKbQbeB4K_jSCBLIV5Ag3Rio0Foc4h6uYfBmTz_vOR7J2ukyrRdgn5dwIc_78jFpa2DSqPa93EbGXeXjW6fTtzFvsExeRynD7-QBDY4iZEYGE2inBGZHZO7elmhh4Ie9G-xV6g2hBZVlWShrDzxGoJjanOiqTxl3530TxVRO-YO3kIzDbG55DouvtyOGdJyQntxyeIB2eR0gZhI5maCAcsD2YODtRyhwIDIXhGiBKmB4GmZ90ZgfQ0zHkLf4aLr5xxZcpeqf3juVUpMUMdOIWQ_VIdldVmPvx13e4FrsVACt4509Uh1vt5R7N-vX6YSh5g9CDrJ8"
} The module args passed in to ec2_snapshot_copy seem legit from what I know about the module, would someone be able to take a look and confirm the service account used has the right permissions? Or would you rather me mark the tests as disabled or something like that? |
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 change on line 141 to declare type ['snapshot'] in ec2_snapshot_copy.py looks good to me
Fixes this issue that shows up when tags are specified: An error occurred waiting for the snapshot to become available.: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value ~ B'ezrat Hashem ~
The new tests seem to be failing due to a permissions issue with the service account used to run them. Since they were marked as optional in the MR I'm going to remove them but leave them in the history[1] so the work's not lost in case someone wants to use them. [1] The tests are still on aec7b2f
I went ahead and removed the tests to get the MR through since they were marked as optional, but since they seemed to be failing because of a permission issue with the service account running them, I kept them in the history[1] in case we want to pull them back in. Feel free to ping me on gchat at work if you'd like to sync up on getting the test running ^_^ [1] The tests are still on aec7b2f |
Hey @tremble just wanted to see if you need anything else from me on this ^_^ |
@bplaxco sorry about the delay here. LGTM |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1605 🤖 @patchback |
Add ResourceType on ec2 snapshot copy SUMMARY Fixes this issue that shows up when tags are specified: An error occurred waiting for the snapshot to become available.: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_snapshot_copy ADDITIONAL INFORMATION # before botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value fatal: [localhost]: FAILED! => { "boto3_version": "1.24.57", "botocore_version": "1.27.58", "changed": false, "error": { "code": "InvalidParameterValue", "message": "Tag specification resource type must have a value" }, .... # after (no error message) changed: [localhost] => { "changed": true, "invocation": { "module_args": { ..... Reviewed-by: Mark Chappell <None> Reviewed-by: Colby Shores <[email protected]> Reviewed-by: None <None> (cherry picked from commit fad3589)
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
[PR #1419/fad35892 backport][stable-5] Add ResourceType on ec2 snapshot copy This is a backport of PR #1419 as merged into main (fad3589). SUMMARY Fixes this issue that shows up when tags are specified: An error occurred waiting for the snapshot to become available.: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_snapshot_copy ADDITIONAL INFORMATION # before botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the CopySnapshot operation: Tag specification resource type must have a value fatal: [localhost]: FAILED! => { "boto3_version": "1.24.57", "botocore_version": "1.27.58", "changed": false, "error": { "code": "InvalidParameterValue", "message": "Tag specification resource type must have a value" }, .... # after (no error message) changed: [localhost] => { "changed": true, "invocation": { "module_args": { ..... Reviewed-by: Mark Chappell <None>
…llections#1419) route53_info: fix "key error" for health_check operations SUMMARY Fixes ansible-collections#1396 This pull request Add new return key health_check_observations for health check operations, returned when I(query=health_check) and I(health_check_method=status) or I(health_check_method=failure_reason) Fixes "Key Error" when getting status or failure_reason of a health check. ISSUE TYPE Bugfix Pull Request COMPONENT NAME route53_info ADDITIONAL INFORMATION Reviewed-by: Mark Chappell Reviewed-by: Mandar Kulkarni <[email protected]> Reviewed-by: Alina Buzachis
SUMMARY
Fixes this issue that shows up when tags are specified:
ISSUE TYPE
COMPONENT NAME
ec2_snapshot_copy
ADDITIONAL INFORMATION