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

Add support for ECR Lifecycle Policies to ecs_ecr #48997

Merged
merged 21 commits into from Dec 19, 2019

Conversation

SpamapS
Copy link
Contributor

@SpamapS SpamapS commented Nov 21, 2018

SUMMARY

Add support for ECR Lifecycle Policies to ecs_ecr. Fixes #32003

ISSUE TYPE
Feature Pull Request
COMPONENT NAME

ecs_ecr

ANSIBLE VERSION

ansible 2.4.0.0
config file = /Users/dlee/.ansible.cfg
configured module search path = [u'/Users/dlee/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.4.0.0/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

ADDITIONAL INFORMATION

Integration tests provided, and they pass.

PLAY RECAP *********************************************************************
localhost : ok=55 changed=8 unreachable=0 failed=0

@SpamapS
Copy link
Contributor Author

SpamapS commented Nov 21, 2018

Rebased #32137

@sivel sivel changed the title ##### SUMMARY Add support for ECR Lifecycle Policies to ecs_ecr Nov 21, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 21, 2018

Hi @SpamapS, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 21, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 aws cloud core_review In order to be merged, this PR must follow the core 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:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 21, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 21, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 3 errors:

lib/ansible/modules/cloud/amazon/ecs_ecr.py:0:0: E309 version_added for new option (lifecycle_policy) should be 2.8. Currently 2.5
lib/ansible/modules/cloud/amazon/ecs_ecr.py:0:0: E309 version_added for new option (purge_lifecycle_policy) should be 2.8. Currently 2.5
lib/ansible/modules/cloud/amazon/ecs_ecr.py:0:0: E309 version_added for new option (purge_policy) should be 2.8. Currently 2.5

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. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. 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 Nov 21, 2018
@abadger abadger removed needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 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. support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 27, 2018
@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 Dec 5, 2018
@Maelstromeous
Copy link

Would be most appreciated if this PR could be picked back up :)

@SpamapS
Copy link
Contributor Author

SpamapS commented Jun 16, 2019

Rebased! I've had this vendored locally since the initial rebase I did... would be great to rejoin the fold in some future Ansible release. :)

leedm777 and others added 18 commits December 18, 2019 14:42
New feature for ecs_ecr to support [ECR Lifecycle Policies][].

Fixes ansible#32003

 [ECR Lifecycle Policies]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html
Replaces the exception and stack trace with a description of what's
actually going wrong from a user perspective.
Marks the `delete_policy` parameter as deprecated, to be removed in
Ansible 2.6.
What I really want is --diff support, and changing results based on
verbosity is abnormal.
The original PR sat while a few releases happened.
This is not allowed and is generally bad practice.
This was added in the time the PR has been in development, so rework
things to use it.
This makes sure that lifecycle_policy is produced when passed in.

*Also a minor suggestion for simplification from PR.
@jillr
Copy link
Contributor

jillr commented Dec 18, 2019

I believe that should do it, sanity and integration tests are passing locally. If CI passes and you don't have any objections to my changes there @SpamapS I'll give it a fresh set of eyes in the morning just to be safe but I think we should be about there.

@ansibot
Copy link
Contributor

ansibot commented Dec 18, 2019

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

lib/ansible/modules/cloud/amazon/ecs_ecr.py:0:0: option-incorrect-version-added: version_added for new option (purge_policy) should be None. Currently '2.10'

click here for bot help

@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Dec 18, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core 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 Dec 18, 2019
Copy link
Contributor

@jillr jillr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks very much @SpamapS!

@jillr jillr merged commit 284f263 into ansible:devel Dec 19, 2019
@ansible ansible locked and limited conversation to collaborators Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aws cloud core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. pr_day Has been reviewed during a PR review Day support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ECR Lifecycle policies
10 participants