-
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
ec2_instance - update build_run_instance_spec to skip TagSpecification if None #1151
ec2_instance - update build_run_instance_spec to skip TagSpecification if None #1151
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
This comment was marked as resolved.
This comment was marked as resolved.
2266692
to
83494d9
Compare
import ansible_collections.amazon.aws.plugins.module_utils.arn as utils_arn | ||
from ansible_collections.amazon.aws.plugins.module_utils.botocore import HAS_BOTO3 | ||
|
||
try: |
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.
This should never happen. botocore
is in the unit-test requirements.
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.
It can cause problems with the sanity tests if you don't add ImportError handling. The sanity tests are supposed to run in a very minimal environment.
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1160 🤖 @patchback |
Backport to stable-4: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply a9ad180 on top of patchback/backports/stable-4/a9ad1808f2e87837eed23d71cac3e35b1d433d23/pr-1151 Backporting merged PR #1151 into main
🤖 @patchback |
…n if None (#1151) ec2_instance - update build_run_instance_spec to skip TagSpecification if None SUMMARY fixes: #1148 When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None. This results in botocore throwing an exception. Also renames instance_role to iam_instance_profile (keeping the original as an alias). While this could be split off, I'll just perform a partial backport for the bugfix when backporting to 4.x, while working through some unit tests the inaccuracy of the parameter name was apparent. ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/ec2_instance.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Gonéri Le Bouder <[email protected]> (cherry picked from commit a9ad180)
…n if None (ansible-collections#1151) ec2_instance - update build_run_instance_spec to skip TagSpecification if None SUMMARY fixes: ansible-collections#1148 When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None. This results in botocore throwing an exception. Also renames instance_role to iam_instance_profile (keeping the original as an alias). While this could be split off, I'll just perform a partial backport for the bugfix when backporting to 4.x, while working through some unit tests the inaccuracy of the parameter name was apparent. ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/ec2_instance.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Gonéri Le Bouder <[email protected]>
…n if None (#1151) (#1160) [PR #1151/a9ad1808 backport][stable-5] ec2_instance - update build_run_instance_spec to skip TagSpecification if None This is a backport of PR #1151 as merged into main (a9ad180). SUMMARY fixes: #1148 When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None. This results in botocore throwing an exception. Also renames instance_role to iam_instance_profile (keeping the original as an alias). While this could be split off, I'll just perform a partial backport for the bugfix when backporting to 4.x, while working through some unit tests the inaccuracy of the parameter name was apparent. ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/ec2_instance.py ADDITIONAL INFORMATION Reviewed-by: Mark Chappell <None>
…collections#1152) lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes ansible-collections#1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@0c76aed
…n if None (#1151) (#1162) [stable-4] ec2_instance - update build_run_instance_spec to skip TagSpecification if None Partial backport of #1151 SUMMARY When no tags are supplied, build_run_instance_spec currently includes 'TagSpecification': None. This results in botocore throwing an exception. ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/modules/ec2_instance.py ADDITIONAL INFORMATION Reviewed-by: Gonéri Le Bouder <[email protected]>
…collections#1152) lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes ansible-collections#1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None>
…collections#1152) lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes ansible-collections#1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None>
…collections#1152) lambda_info - refactor to fix bug when querying all lambdas Depends-On: ansible/ansible-zuul-jobs#1558 SUMMARY Fix bug that forces query: config when getting info for all lambdas. Refactored to return the expected info Add extra cleanup at end of tests Fixes ansible-collections#1151 ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION This module also currently returns a dict of dicts (as opposed to a list of dicts), but I wanted to keep the scope of this PR to fixing the bug. Reviewed-by: Mark Chappell <None> Reviewed-by: Joseph Torcasso <None> Reviewed-by: Jill R <None>
SUMMARY
fixes: #1148
When no tags are supplied, build_run_instance_spec currently includes
'TagSpecification': None
. This results in botocore throwing an exception.Also renames
instance_role
toiam_instance_profile
(keeping the original as an alias). While this could be split off, I'll just perform a partial backport for the bugfix when backporting to 4.x, while working through some unit tests the inaccuracy of the parameter name was apparent.ISSUE TYPE
COMPONENT NAME
plugins/modules/ec2_instance.py
ADDITIONAL INFORMATION