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_bucket_info - add support for bucket versioning in bucket_facts #1919

Conversation

abikouo
Copy link
Contributor

@abikouo abikouo commented Dec 11, 2023

SUMMARY

Module s3_bucket_info should be able to return the bucket versioning into bucket_facts

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

s3_bucket_info

ADDITIONAL INFORMATION
- amazon.aws.s3_bucket_info:
   name: mybucket
   bucket_facts:
    bucket_versioninig: true

expecting output

{
    "bucket_name": "mybucket",
    "buckets": [
         {
            "bucket_versioning": {"Status": "Enabled"},    ## New information in output
           "creation_date": "2023-12-11T15:48:42+00:00",
           "name": "mybucket"
         }
    ],
   "changed": false,
   "msg": "Retrieved s3 info."
}

Copy link

github-actions bot commented Dec 11, 2023

Docs Build 📝

Thank you for contribution!✨

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

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 14s
✔️ build-ansible-collection SUCCESS in 14m 28s
✔️ ansible-test-splitter SUCCESS in 5m 53s
✔️ integration-amazon.aws-1 SUCCESS in 6m 42s
Skipped 43 jobs

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 16s
✔️ build-ansible-collection SUCCESS in 13m 56s
✔️ ansible-test-splitter SUCCESS in 5m 39s
✔️ integration-amazon.aws-1 SUCCESS in 8m 54s
Skipped 43 jobs

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 4m 44s
✔️ build-ansible-collection SUCCESS in 15m 18s
✔️ ansible-test-splitter SUCCESS in 6m 00s
✔️ integration-amazon.aws-1 SUCCESS in 9m 11s
Skipped 43 jobs

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 08s
✔️ build-ansible-collection SUCCESS in 15m 03s
✔️ ansible-test-splitter SUCCESS in 5m 39s
✔️ integration-amazon.aws-1 SUCCESS in 16m 20s
✔️ integration-amazon.aws-2 SUCCESS in 6m 54s
Skipped 42 jobs

Copy link
Contributor

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

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

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 3m 54s
✔️ build-ansible-collection SUCCESS in 15m 34s
✔️ ansible-test-splitter SUCCESS in 5m 30s
✔️ integration-amazon.aws-1 SUCCESS in 6m 37s
Skipped 43 jobs

@@ -64,6 +66,8 @@
- item.bucket_tagging["lowercase spaced"] == 'hello cruel world'
- item.bucket_tagging["Title Case"] == 'Hello Cruel World'
- item.bucket_location.LocationConstraint == aws_region
- item.bucket_versioning.Status is defined
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we check for the value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GomathiselviS for this specific test case I am just checking if the user request for the versioning information it is part of the ansible response, I don't want to check whether the versioning is enabled or not

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please clarify why not? The task's name indicates "Assert that retrieved bucket facts contain valid data," and it verifies the values of other parameters. Wouldn't it be appropriate to also verify the value of bucket_versioning parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GomathiselviS I have added an extra validation to ensure that the versioning is enabled

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 11s
✔️ build-ansible-collection SUCCESS in 16m 17s
✔️ ansible-test-splitter SUCCESS in 5m 49s
✔️ integration-amazon.aws-1 SUCCESS in 7m 38s
✔️ integration-amazon.aws-2 SUCCESS in 11m 36s
Skipped 42 jobs

@abikouo abikouo added the mergeit Merge the PR (SoftwareFactory) label Dec 18, 2023
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 9m 00s
✔️ build-ansible-collection SUCCESS in 15m 08s
✔️ ansible-test-splitter SUCCESS in 5m 57s
✔️ integration-amazon.aws-1 SUCCESS in 6m 38s
✔️ integration-amazon.aws-2 SUCCESS in 13m 49s
Skipped 42 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 8ab86dd into ansible-collections:main Dec 18, 2023
37 of 40 checks passed
@tremble tremble added the backport-7 PR should be backported to the stable-7 branch label Jan 10, 2024
Copy link

patchback bot commented Jan 10, 2024

Backport to stable-7: cherry-pick succeeded

Backport PR branch: patchback/backports/stable-7/8ab86dd00264ff9d522fa5f7cfcff1f50f962067/pr-1919

PR branch created, proceeding with making a PR.

🤖 @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 Jan 10, 2024
…1919)

s3_bucket_info - add support for bucket versioning in bucket_facts

SUMMARY
Module s3_bucket_info should be able to return the bucket versioning into bucket_facts
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

s3_bucket_info
ADDITIONAL INFORMATION

- amazon.aws.s3_bucket_info:
   name: mybucket
   bucket_facts:
    bucket_versioninig: true
expecting output
{
    "bucket_name": "mybucket",
    "buckets": [
         {
            "bucket_versioning": {"Status": "Enabled"},    ## New information in output
           "creation_date": "2023-12-11T15:48:42+00:00",
           "name": "mybucket"
         }
    ],
   "changed": false,
   "msg": "Retrieved s3 info."
}

Reviewed-by: Alina Buzachis
Reviewed-by: GomathiselviS
Reviewed-by: Bikouo Aubin
Reviewed-by: Helen Bailey <hebailey@redhat.com>
(cherry picked from commit 8ab86dd)
@tremble tremble added backport-7 PR should be backported to the stable-7 branch and removed backport-7 PR should be backported to the stable-7 branch labels Jan 10, 2024
Copy link

patchback bot commented Jan 10, 2024

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/8ab86dd00264ff9d522fa5f7cfcff1f50f962067/pr-1919

Backported as #1946

🤖 @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 Jan 10, 2024
…1919)

s3_bucket_info - add support for bucket versioning in bucket_facts

SUMMARY
Module s3_bucket_info should be able to return the bucket versioning into bucket_facts
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

s3_bucket_info
ADDITIONAL INFORMATION

- amazon.aws.s3_bucket_info:
   name: mybucket
   bucket_facts:
    bucket_versioninig: true
expecting output
{
    "bucket_name": "mybucket",
    "buckets": [
         {
            "bucket_versioning": {"Status": "Enabled"},    ## New information in output
           "creation_date": "2023-12-11T15:48:42+00:00",
           "name": "mybucket"
         }
    ],
   "changed": false,
   "msg": "Retrieved s3 info."
}

Reviewed-by: Alina Buzachis
Reviewed-by: GomathiselviS
Reviewed-by: Bikouo Aubin
Reviewed-by: Helen Bailey <hebailey@redhat.com>
(cherry picked from commit 8ab86dd)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 10, 2024
…1919) (#1946)

[PR #1919/8ab86dd0 backport][stable-7] s3_bucket_info - add support for bucket versioning in bucket_facts

This is a backport of PR #1919 as merged into main (8ab86dd).
SUMMARY
Module s3_bucket_info should be able to return the bucket versioning into bucket_facts
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

s3_bucket_info
ADDITIONAL INFORMATION



- amazon.aws.s3_bucket_info:
   name: mybucket
   bucket_facts:
    bucket_versioninig: true
expecting output
{
    "bucket_name": "mybucket",
    "buckets": [
         {
            "bucket_versioning": {"Status": "Enabled"},    ## New information in output
           "creation_date": "2023-12-11T15:48:42+00:00",
           "name": "mybucket"
         }
    ],
   "changed": false,
   "msg": "Retrieved s3 info."
}

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

Successfully merging this pull request may close these issues.

5 participants