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

s3_lifecycle - ability to set the number of newest noncurrent versions to retain #1606

Conversation

davejames
Copy link
Contributor

SUMMARY

Adds the ability to set "Number of newer versions to retain"

image

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

s3_lifecycle

ADDITIONAL INFORMATION

See: https://docs.aws.amazon.com/AmazonS3/latest/API/API_NoncurrentVersionExpiration.html

Previously only the NoncurrentDays parameter was supported, this PR adds support for NewerNoncurrentVersions

@davejames davejames force-pushed the s3_lifecycle_num_noncurrent_versions branch from 1837c90 to aadfa5f Compare November 26, 2022 09:43
@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Nov 26, 2022
@github-actions
Copy link

github-actions bot commented Nov 26, 2022

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 06s
✔️ build-ansible-collection SUCCESS in 5m 00s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 58s (non-voting)
ansible-test-sanity-docker-milestone FAILURE in 8m 49s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 44s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 9m 27s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 32s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 42s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 13s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 59s
✔️ ansible-test-changelog SUCCESS in 2m 21s
✔️ ansible-test-splitter SUCCESS in 2m 40s
✔️ integration-community.aws-1 SUCCESS in 21m 28s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@markuman
Copy link
Member

@davejames can you also expand the integration test to verify the new parameter? tests/integration/targets/s3_lifecycle/tasks/main.yml
Otherwise looks good to me.

@tremble tremble force-pushed the s3_lifecycle_num_noncurrent_versions branch from aadfa5f to 40fba8d Compare February 1, 2023 14:03
@ansibullbot ansibullbot added integration tests/integration tests tests labels Feb 1, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 19s
✔️ build-ansible-collection SUCCESS in 6m 05s
✔️ ansible-test-sanity-docker-devel SUCCESS in 10m 30s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 54s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 9m 36s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 01s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 01s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 6m 32s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 7m 04s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 5m 44s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 54s
✔️ ansible-test-changelog SUCCESS in 2m 18s
✔️ ansible-test-splitter SUCCESS in 2m 56s
✔️ integration-community.aws-1 SUCCESS in 25m 08s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

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

Added some integration tests and a dependency on the relevant version of botocore.

I also set it up so that if you set noncurrent_version_keep_newer you must also set noncurrent_version_expiration_days, otherwise AWS spits out schema errors.

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Feb 1, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 14s
✔️ build-ansible-collection SUCCESS in 5m 40s
✔️ ansible-test-sanity-docker-devel SUCCESS in 12m 20s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 39s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 15s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 02s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 9m 30s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 42s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 34s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 37s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 27s
✔️ ansible-test-changelog SUCCESS in 2m 16s
✔️ ansible-test-splitter SUCCESS in 2m 31s
✔️ integration-community.aws-1 SUCCESS in 25m 09s
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 3391b27 into ansible-collections:main Feb 1, 2023
@tremble tremble added the backport-5 PR should be backported to the stable-5 branch label Feb 1, 2023
@patchback
Copy link

patchback bot commented Feb 1, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/3391b27d0c856d7b044de2a49da730cc6e5481f9/pr-1606

Backported as #1687

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Feb 1, 2023
…s to retain (#1606)

s3_lifecycle - ability to set the number of newest noncurrent versions to retain

SUMMARY
Adds the ability to set "Number of newer versions to retain"

ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_lifecycle
ADDITIONAL INFORMATION
See: https://docs.aws.amazon.com/AmazonS3/latest/API/API_NoncurrentVersionExpiration.html
Previously only the NoncurrentDays parameter was supported, this PR adds support for NewerNoncurrentVersions

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit 3391b27)
@tremble
Copy link
Contributor

tremble commented Feb 1, 2023

@davejames Thanks for taking the time to submit this PR.

softwarefactory-project-zuul bot pushed a commit that referenced this pull request Feb 1, 2023
…s to retain (#1606) (#1687)

[PR #1606/3391b27d backport][stable-5] s3_lifecycle - ability to set the number of newest noncurrent versions to retain

This is a backport of PR #1606 as merged into main (3391b27).
SUMMARY
Adds the ability to set "Number of newer versions to retain"

ISSUE TYPE


Feature Pull Request

COMPONENT NAME
s3_lifecycle
ADDITIONAL INFORMATION
See: https://docs.aws.amazon.com/AmazonS3/latest/API/API_NoncurrentVersionExpiration.html
Previously only the NoncurrentDays parameter was supported, this PR adds support for NewerNoncurrentVersions

Reviewed-by: Mark Chappell <None>
@davejames davejames deleted the s3_lifecycle_num_noncurrent_versions branch February 12, 2023 23:39
@davejames davejames restored the s3_lifecycle_num_noncurrent_versions branch February 12, 2023 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants