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

ec2_tag: move to boto3, implemented diff and max_attempts support #43350

Closed
wants to merge 7 commits into from

Conversation

hryamzik
Copy link
Contributor

SUMMARY
  • fixed issue with role-based profiles by moving to boto3
  • added diff support
  • added max_attempts support
ISSUE TYPE
  • Feature Pull Request
  • Bugfix Pull Request
COMPONENT NAME

ec2_tag

ANSIBLE VERSION
2.6.1
ADDITIONAL INFORMATION

Relates to #43348.

@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

cc @lwade
click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

Hi @hryamzik,

Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 aws cloud committer_review In order to be merged, this PR must follow the certified review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:certified This issue/PR relates to certified code. labels Jul 27, 2018
@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

The test ansible-test sanity --test pylint [explain] failed with 4 errors:

lib/ansible/modules/cloud/amazon/ec2_tag.py:147:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:156:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:183:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:220:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test no-dict-iteritems [explain] failed with 5 errors:

lib/ansible/modules/cloud/amazon/ec2_tag.py:197:99: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/amazon/ec2_tag.py:213:102: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/amazon/ec2_tag.py:223:33: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/amazon/ec2_tag.py:228:80: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/amazon/ec2_tag.py:229:80: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`

The test ansible-test sanity --test no-dict-iterkeys [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/ec2_tag.py:225:29: use `dict.keys` or `for key in dict:` instead of `dict.iterkeys`

The test ansible-test sanity --test pep8 [explain] failed with 19 errors:

lib/ansible/modules/cloud/amazon/ec2_tag.py:127:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/amazon/ec2_tag.py:133:37: E231 missing whitespace after ','
lib/ansible/modules/cloud/amazon/ec2_tag.py:147:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:149:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:150:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:152:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:153:9: E121 continuation line under-indented for hanging indent
lib/ansible/modules/cloud/amazon/ec2_tag.py:155:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:156:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:183:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:197:85: E231 missing whitespace after ','
lib/ansible/modules/cloud/amazon/ec2_tag.py:213:85: E231 missing whitespace after ','
lib/ansible/modules/cloud/amazon/ec2_tag.py:220:1: W293 blank line contains whitespace
lib/ansible/modules/cloud/amazon/ec2_tag.py:222:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:223:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:225:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:227:7: E111 indentation is not a multiple of four
lib/ansible/modules/cloud/amazon/ec2_tag.py:228:9: E121 continuation line under-indented for hanging indent
lib/ansible/modules/cloud/amazon/ec2_tag.py:229:17: E241 multiple spaces after ':'

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/ec2_tag.py:0:0: E309 version_added for new option (max_attempts) should be 2.7. Currently 0.0

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed committer_review In order to be merged, this PR must follow the certified review workflow. labels Jul 27, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jul 27, 2018
@ansibot ansibot added committer_review In order to be merged, this PR must follow the certified review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 27, 2018
@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

The test ansible-test sanity --test no-dict-iteritems [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/ec2_tag.py:198:100: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. and removed committer_review In order to be merged, this PR must follow the certified review workflow. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jul 27, 2018
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 27, 2018
@ansibot ansibot added committer_review In order to be merged, this PR must follow the certified review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 27, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Jul 27, 2018
@s-hertel
Copy link
Contributor

There is another pull request for this in the works right now (#39712). Do you mind testing it out and seeing if it meets your needs?

@hryamzik
Copy link
Contributor Author

Oh, I've missed it. That PR doesn't add diff and retries options that really help me with large amount of volumes.

@hryamzik
Copy link
Contributor Author

Looks like you've been waiting for a new PR to merge a previous one and get conflicts, lol.

@ansibot
Copy link
Contributor

ansibot commented Jul 27, 2018

@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 committer_review In order to be merged, this PR must follow the certified review workflow. labels Jul 27, 2018
@hryamzik
Copy link
Contributor Author

Hold on, I'm trying to resolve conflicts. Not sure how to tune retries settings for module.client('ec2')...

@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 Aug 4, 2018
@hryamzik
Copy link
Contributor Author

hryamzik commented Aug 9, 2018

@s-hertel I didn;t manage to reproduce any connection issues with a new code but it doesn't support diff, AttributeError: 'AnsibleAWSModule' object has no attribute '_diff'. Any ideas how to fix this?

I also failed to find a way to push configuration settings to AnsibleAWSModule.

@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:certified This issue/PR relates to certified code. labels Oct 12, 2018
@ansibot
Copy link
Contributor

ansibot commented Jan 31, 2020

@ansibot ansibot added collection Related to Ansible Collections work collection:amazon.aws needs_collection_redirect https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md 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.7 This issue/PR affects Ansible v2.7 aws bot_closed cloud collection:amazon.aws collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_issue module This issue/PR relates to a module. 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. 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.

None yet

3 participants