Skip to content
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

checks if tags_dict exists and has data before using it. #63169

Closed
wants to merge 1 commit into from

Conversation

ffreitasalves
Copy link

SUMMARY

Checks if tags_dict was provided either as an empty dictionary or not provided at all (NoneType) before trying to access its items

Fixes #58821

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2 module_utils

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 6, 2019
@ffreitasalves ffreitasalves changed the title checks if tags_dict exists has data before using it. checks if tags_dict exists and has data before using it. Oct 6, 2019
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Oct 6, 2019
@goneri goneri added the ci_verified Changes made in this PR are causing tests to fail. label Oct 7, 2019
@Shaps
Copy link
Contributor

Shaps commented Oct 8, 2019

From what I can see CI failure is not related to the PR. @ffreitasalves Would you be able to add an integration test for this change?

/cc @jillr

@jillr
Copy link
Contributor

jillr commented Oct 8, 2019

From what I can see CI failure is not related to the PR. @ffreitasalves Would you be able to add an integration test for this change?

/cc @jillr

It looks like the error message changed again - we'd modified the assertion in sts_assume_role last year due to a similar issue in #46026. I'll take a look and see what's going on with that particular test.

@ffreitasalves
Copy link
Author

From what I can see CI failure is not related to the PR. @ffreitasalves Would you be able to add an integration test for this change?

/cc @jillr

Will do.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Oct 12, 2019
@sivel sivel requested a review from jillr October 15, 2019 15:17
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Oct 15, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Oct 23, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 8, 2019
@jillr
Copy link
Contributor

jillr commented Nov 18, 2019

It would be good to get this patch merged, would you still be able to add integration tests to cover this case @ffreitasalves? CI is passing.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Mar 26, 2020
@ansibot ansibot added collection Related to Ansible Collections work collection:amazon.aws and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 29, 2020
@ansibot ansibot added needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md support:community This issue/PR relates to code supported by the Ansible community. labels Apr 29, 2020
@ansibot
Copy link
Contributor

ansibot commented Aug 16, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@ansibot ansibot closed this Aug 16, 2020
@ansible ansible locked and limited conversation to collaborators Sep 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 aws bot_closed bug This issue/PR relates to a bug. cloud collection:amazon.aws collection Related to Ansible Collections work needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. small_patch stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2_instance - creating/updating instance fails when tags are not provided
6 participants