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 Object Lock default retention configuration for S3 buckets #2062

Conversation

abraverm
Copy link
Contributor

SUMMARY

https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html#object-lock-configure-set-retention-period-object

Design detail:
AWS API doesn't support unsetting the default retention, though it is possible in the Web console.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

s3_bucket

Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 2062,95fca997730df9369056aae41d066da020afe7f4

Copy link

github-actions bot commented Apr 26, 2024

Docs Build 📝

Thank you for contribution!✨

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

@abraverm abraverm force-pushed the Object-Lock-default-retention branch from 8f57ebc to 99375bb Compare April 26, 2024 16:30
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/8af8636d02ec441d954236ae61c6ceda

✔️ ansible-galaxy-importer SUCCESS in 5m 54s
✔️ build-ansible-collection SUCCESS in 16m 15s
✔️ ansible-test-splitter SUCCESS in 6m 30s
integration-amazon.aws-1 FAILURE in 7m 42s
Skipped 43 jobs

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/57d1a884ecc14296b33dbd55c384bd75

✔️ ansible-galaxy-importer SUCCESS in 4m 44s
✔️ build-ansible-collection SUCCESS in 14m 22s
✔️ ansible-test-splitter SUCCESS in 6m 52s
integration-amazon.aws-1 FAILURE in 6m 26s
Skipped 43 jobs

@abraverm abraverm force-pushed the Object-Lock-default-retention branch from ab58df0 to ff9382b Compare April 26, 2024 18:08
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/d8708008f8bf4f168dbf458041c73686

✔️ ansible-galaxy-importer SUCCESS in 4m 08s
✔️ build-ansible-collection SUCCESS in 16m 44s
✔️ ansible-test-splitter SUCCESS in 6m 11s
✔️ integration-amazon.aws-1 SUCCESS in 7m 51s
Skipped 43 jobs

Copy link
Contributor

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

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

This looks good! See a few mostly minor comments below.

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/10d050db9404487596cd4696ef9f382e

✔️ ansible-galaxy-importer SUCCESS in 5m 50s
✔️ build-ansible-collection SUCCESS in 15m 46s
✔️ ansible-test-splitter SUCCESS in 6m 15s
✔️ integration-amazon.aws-1 SUCCESS in 8m 38s
Skipped 43 jobs

@abraverm
Copy link
Contributor Author

abraverm commented Jun 6, 2024

Thank you @hakbailey, I have addressed your comments, could you give it another look?

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/6d42b665a1cd484a9592c402fe86c811

⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection
build-ansible-collection RETRY_LIMIT in 6m 29s
ansible-test-splitter RETRY_LIMIT in 5m 44s
⚠️ integration-amazon.aws-1 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-2 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-3 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-4 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-5 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-6 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-7 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-8 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-9 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-10 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-11 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-12 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-13 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-14 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-15 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-16 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-17 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-18 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-19 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-20 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-21 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-amazon.aws-22 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-1 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-2 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-3 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-4 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-5 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-6 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-7 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-8 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-9 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-10 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-11 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-12 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-13 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-14 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-15 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-16 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-17 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-18 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-19 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-20 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-21 SKIPPED Skipped due to failed job build-ansible-collection
⚠️ integration-community.aws-22 SKIPPED Skipped due to failed job build-ansible-collection

@abraverm
Copy link
Contributor Author

abraverm commented Jun 6, 2024

retry

@abraverm
Copy link
Contributor Author

abraverm commented Jun 6, 2024

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/9e3fded273c148bca7e5cb5864a2295e

✔️ ansible-galaxy-importer SUCCESS in 5m 14s
✔️ build-ansible-collection SUCCESS in 16m 42s
✔️ ansible-test-splitter SUCCESS in 7m 27s
✔️ integration-amazon.aws-1 SUCCESS in 8m 08s
Skipped 43 jobs

@hakbailey hakbailey added this to the 8.1.0 milestone Jun 26, 2024
Copy link
Contributor

@hakbailey hakbailey left a comment

Choose a reason for hiding this comment

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

A few more minor comments. In addition, running tox -e black locally should fix the linting errors.

Copy link
Collaborator

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

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

@abraverm Thank you for working on this feature idea. Can you please add a changelog fragment (https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment) for this change?

@alinabuzachis alinabuzachis force-pushed the Object-Lock-default-retention branch 3 times, most recently from 50a508c to f57b820 Compare June 28, 2024 10:10
@alinabuzachis alinabuzachis added the backport-8 PR should be backported to the stable-8 branch label Jun 28, 2024
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/547b1bef8c6e4006b7c4b9a2ff8914a9

✔️ ansible-galaxy-importer SUCCESS in 4m 37s
✔️ build-ansible-collection SUCCESS in 13m 05s
✔️ ansible-test-splitter SUCCESS in 5m 02s
✔️ integration-amazon.aws-1 SUCCESS in 6m 44s
Skipped 43 jobs

@hakbailey hakbailey added the mergeit Merge the PR (SoftwareFactory) label Jun 28, 2024
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/ansible-collections/amazon.aws for 2062,f57b8205dba1d4f91e7a9dcf261c9710e6ad2d0e

@alinabuzachis alinabuzachis force-pushed the Object-Lock-default-retention branch from f57b820 to 03e0e28 Compare June 28, 2024 15:15
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/b406e0f3fa1b4715874d3a5abb360ba1

✔️ ansible-galaxy-importer SUCCESS in 4m 51s
✔️ build-ansible-collection SUCCESS in 12m 51s
✔️ ansible-test-splitter SUCCESS in 4m 56s
✔️ integration-amazon.aws-1 SUCCESS in 7m 15s
Skipped 43 jobs

Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/3a5d41c3cec74eba8b7e864da44fe4f4

✔️ ansible-galaxy-importer SUCCESS in 3m 36s
✔️ build-ansible-collection SUCCESS in 13m 16s
✔️ ansible-test-splitter SUCCESS in 4m 55s
✔️ integration-amazon.aws-1 SUCCESS in 5m 13s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit c2e7aaf into ansible-collections:main Jun 28, 2024
36 checks passed
Copy link

patchback bot commented Jun 28, 2024

Backport to stable-8: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply c2e7aaf on top of patchback/backports/stable-8/c2e7aaf5cadbf7873698edd3dce59ec53583e893/pr-2062

Backporting merged PR #2062 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/amazon.aws.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-8/c2e7aaf5cadbf7873698edd3dce59ec53583e893/pr-2062 upstream/stable-8
  4. Now, cherry-pick PR Add Object Lock default retention configuration for S3 buckets #2062 contents into that branch:
    $ git cherry-pick -x c2e7aaf5cadbf7873698edd3dce59ec53583e893
    If it'll yell at you with something like fatal: Commit c2e7aaf5cadbf7873698edd3dce59ec53583e893 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x c2e7aaf5cadbf7873698edd3dce59ec53583e893
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Add Object Lock default retention configuration for S3 buckets #2062 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-8/c2e7aaf5cadbf7873698edd3dce59ec53583e893/pr-2062
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

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

@abraverm
Copy link
Contributor Author

Thank you very much for merging this PR, I was a bit busy and couldn't respond on time.

alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Jul 1, 2024
…le-collections#2062)

SUMMARY
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html#object-lock-configure-set-retention-period-object
Design detail:
AWS API doesn't support unsetting the default retention, though it is possible in the Web console.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_bucket

Reviewed-by: Helen Bailey <[email protected]>
Reviewed-by: Alina Buzachis
Reviewed-by: Mike Graves <[email protected]>
(cherry picked from commit c2e7aaf)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jul 2, 2024
#2177)

SUMMARY
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html#object-lock-configure-set-retention-period-object Design detail:
AWS API doesn't support unsetting the default retention, though it is possible in the Web console. ISSUE TYPE
Feature Pull Request
COMPONENT NAME
s3_bucket
Reviewed-by: Helen Bailey [email protected]
Reviewed-by: Alina Buzachis
Reviewed-by: Mike Graves [email protected]
(cherry picked from commit c2e7aaf)
SUMMARY


ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mike Graves <[email protected]>
Reviewed-by: GomathiselviS
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Aug 27, 2024
…2236)

SUMMARY
Updated return block of following modules

s3_bucket
s3_bucket_info
s3_object

ISSUE TYPE
Docs Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
Manual backport (because #2062 / #2177 was manually backported)

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8 PR should be backported to the stable-8 branch mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants