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

Rename aws_s3 to s3_object (and deprecate bucket creation/deleting) #869

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Jun 7, 2022

SUMMARY

The aws_s3 module (as it's known today) is primarily for managing objects within S3. While it provides minimal support for creating S3 buckets, the feature set is very limited. Support for the advanced bucket management features is provided via the s3_bucket modules (such as managing encryption settings).

Because the name aws_s3 often puts the module at the top of the list of modules, well away from the s3_bucket module, it can be difficult for folks to discover the s3_bucket module leading them to assume that we simply have no support for the more complex s3_bucket management features.

As such, I suggest renaming the module to s3_object to make the intended scope more obvious and to improve the discoverability of s3_bucket. At this time I do not recommend setting a deprecation date for the alias, the cost of an alias is minimal and we've had a lot of churn recently.

Additionally, deprecates the duplicated (but very limited) bucket creation/deletion functionality of aws_s3/s3_object

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • aws_s3
    (s3_object)
ADDITIONAL INFORMATION

See for example #866 where there was an attempt to create duplicate functionality.

@tremble tremble added the do_not_backport This PR should not be backported to stable- branches unless absolutely necessary label Jun 7, 2022
@tremble tremble requested review from alinabuzachis and jillr June 7, 2022 15:20
@github-actions
Copy link

github-actions bot commented Jun 7, 2022

Docs Build 📝

Thank you for contribution!✨

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

@alinabuzachis
Copy link
Collaborator

alinabuzachis commented Jun 7, 2022

I totally agree, s3_object is more indicative of the module's functionality.

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module new_module New module new_plugin New plugin plugins plugin (any type) labels Jun 7, 2022
@softwarefactory-project-zuul

This comment was marked as outdated.

@tremble tremble force-pushed the rename/s3_object branch 3 times, most recently from 2568a8c to f8ad593 Compare June 7, 2022 15:54
@tremble tremble requested review from alinabuzachis and s-hertel June 7, 2022 15:56
@ansibullbot ansibullbot added action action plugin integration tests/integration tests tests labels Jun 7, 2022
@softwarefactory-project-zuul

This comment was marked as resolved.

@tremble tremble force-pushed the rename/s3_object branch 2 times, most recently from 4667670 to 2b4fa8c Compare June 7, 2022 16:29
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 35s
✔️ build-ansible-collection SUCCESS in 4m 56s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 50s
✔️ ansible-test-sanity-aws-ansible-2.9-python38 SUCCESS in 12m 02s
✔️ ansible-test-sanity-aws-ansible-2.11-python38 SUCCESS in 10m 32s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 55s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 01s
✔️ ansible-test-splitter SUCCESS in 2m 34s
✔️ integration-amazon.aws-1 SUCCESS in 10m 54s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-community.aws-1 SKIPPED
⚠️ 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

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 00s
✔️ build-ansible-collection SUCCESS in 4m 41s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 39s
✔️ ansible-test-sanity-aws-ansible-2.9-python38 SUCCESS in 11m 20s
✔️ ansible-test-sanity-aws-ansible-2.11-python38 SUCCESS in 8m 55s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 52s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 21s
✔️ ansible-test-splitter SUCCESS in 2m 22s
✔️ integration-amazon.aws-1 SUCCESS in 8m 48s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-community.aws-1 SKIPPED
⚠️ 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

Copy link
Collaborator

@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.

One typo, otherwise LGTM

plugins/modules/s3_object.py Outdated Show resolved Hide resolved
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 44s
✔️ build-ansible-collection SUCCESS in 4m 47s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 33s
✔️ ansible-test-sanity-aws-ansible-2.9-python38 SUCCESS in 11m 21s
✔️ ansible-test-sanity-aws-ansible-2.11-python38 SUCCESS in 11m 21s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 00s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 23s
✔️ ansible-test-splitter SUCCESS in 2m 24s
✔️ integration-amazon.aws-1 SUCCESS in 9m 14s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
✔️ integration-community.aws-1 SUCCESS in 6m 31s
⚠️ 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

@tremble tremble force-pushed the rename/s3_object branch from 68bf981 to be75554 Compare June 8, 2022 05:29
@tremble tremble force-pushed the rename/s3_object branch from be75554 to 06bcb48 Compare June 8, 2022 05:30
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 4m 12s
✔️ build-ansible-collection SUCCESS in 5m 08s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 28s
✔️ ansible-test-sanity-aws-ansible-2.9-python38 SUCCESS in 11m 01s
✔️ ansible-test-sanity-aws-ansible-2.11-python38 SUCCESS in 9m 54s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 02s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 22s
✔️ ansible-test-splitter SUCCESS in 2m 22s
✔️ integration-amazon.aws-1 SUCCESS in 9m 08s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
⚠️ integration-community.aws-1 SKIPPED
⚠️ 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

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Jun 8, 2022
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 16s
✔️ build-ansible-collection SUCCESS in 4m 47s
✔️ ansible-test-sanity-aws-ansible-python38 SUCCESS in 9m 27s
✔️ ansible-test-sanity-aws-ansible-2.9-python38 SUCCESS in 11m 11s
✔️ ansible-test-sanity-aws-ansible-2.11-python38 SUCCESS in 9m 33s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 57s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 21s
✔️ ansible-test-splitter SUCCESS in 2m 21s
✔️ integration-amazon.aws-1 SUCCESS in 8m 50s
⚠️ integration-amazon.aws-2 SKIPPED
⚠️ integration-amazon.aws-3 SKIPPED
⚠️ integration-amazon.aws-4 SKIPPED
⚠️ integration-amazon.aws-5 SKIPPED
⚠️ integration-amazon.aws-6 SKIPPED
⚠️ integration-amazon.aws-7 SKIPPED
⚠️ integration-amazon.aws-8 SKIPPED
⚠️ integration-amazon.aws-9 SKIPPED
⚠️ integration-amazon.aws-10 SKIPPED
⚠️ integration-amazon.aws-11 SKIPPED
⚠️ integration-amazon.aws-12 SKIPPED
⚠️ integration-amazon.aws-13 SKIPPED
✔️ integration-community.aws-1 SUCCESS in 6m 04s
⚠️ 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

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 84f5fd9 into ansible-collections:main Jun 8, 2022
jatorcasso pushed a commit to jatorcasso/amazon.aws that referenced this pull request Jun 27, 2022
…nsible-collections#869)

Rename aws_s3 to s3_object (and deprecate bucket creation/deleting)

SUMMARY
The aws_s3 module (as it's known today) is primarily for managing objects within S3.  While it provides minimal support for creating S3 buckets, the feature set is very limited.  Support for the advanced bucket management features is provided via the s3_bucket modules (such as managing encryption settings).
Because the name aws_s3 often puts the module at the top of the list of modules, well away from the s3_bucket module, it can be difficult for folks to discover the s3_bucket module leading them to assume that we simply have no support for the more complex s3_bucket management features.
As such, I suggest renaming the module to s3_object to make the intended scope more obvious and to improve the discoverability of s3_bucket.  At this time I do not recommend setting a deprecation date for the alias, the cost of an alias is minimal and we've had a lot of churn recently.
Additionally, deprecates the duplicated (but very limited) bucket creation/deletion functionality of aws_s3/s3_object
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

aws_s3
(s3_object)

ADDITIONAL INFORMATION
See for example ansible-collections#866 where there was an attempt to create duplicate functionality.

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
@tremble tremble deleted the rename/s3_object branch September 9, 2022 08:50
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
… integration tests (ansible-collections#870)

Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests

SUMMARY

This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag.
Additionally, this PR fixes issues with the aws_acm integration tests.  The integration tests were using deprecated tasks or attributes, such as openssl_certificate.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_acm
ADDITIONAL INFORMATION


Changes to the aws_acm.py module:

Add new tags and purge_tags attributes.
The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate.
The aws_acm module returns the updated tags. See example below.
Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next.

Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes.
Example return value:
"certificate": {
            "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243",
            "domain_name": "acm1.949058644.ansible.com",
            "tags": {
                "Application": "search",
                "Environment": "development",
                "Name": "ansible-test-78006277-398b5796f999_949058644_1"
            }
        }

Integration tests:

The openssl_certificate task is deprecated. Migrate to x509_certificate.
The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead.
The integration tests for the aws_acm module pass locally.
I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes.

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Sebastien Rosset <None>
Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Sep 18, 2023
… integration tests (ansible-collections#870)

Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests

SUMMARY

This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag.
Additionally, this PR fixes issues with the aws_acm integration tests.  The integration tests were using deprecated tasks or attributes, such as openssl_certificate.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_acm
ADDITIONAL INFORMATION


Changes to the aws_acm.py module:

Add new tags and purge_tags attributes.
The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate.
The aws_acm module returns the updated tags. See example below.
Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next.

Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes.
Example return value:
"certificate": {
            "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243",
            "domain_name": "acm1.949058644.ansible.com",
            "tags": {
                "Application": "search",
                "Environment": "development",
                "Name": "ansible-test-78006277-398b5796f999_949058644_1"
            }
        }

Integration tests:

The openssl_certificate task is deprecated. Migrate to x509_certificate.
The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead.
The integration tests for the aws_acm module pass locally.
I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes.

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Sebastien Rosset <None>
Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
abikouo pushed a commit to abikouo/amazon.aws that referenced this pull request Oct 24, 2023
… integration tests (ansible-collections#870)

Add support for tagging certificates. Fix deprecated tasks in aws_acm integration tests

SUMMARY

This PR adds support for configuring arbitrary tags when importing a certificate using the aws_acm module. Previously, it was only possible to set the 'Name' tag.
Additionally, this PR fixes issues with the aws_acm integration tests.  The integration tests were using deprecated tasks or attributes, such as openssl_certificate.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

aws_acm
ADDITIONAL INFORMATION


Changes to the aws_acm.py module:

Add new tags and purge_tags attributes.
The certificate_arn attribute is now allowed when state='present'. A playbook should be allowed to modify an existing certificate entry by providing the ARN. For example, a play may want to add, modify, remove tags on an existing certificate.
The aws_acm module returns the updated tags. See example below.
Refactor aws_acm.py to improve code reuse and make it possible to set arbitrary tags. This should also help to 1) improve readability. 2) prepare for ansible-collections#869 which I am planning to work on next.

Backwards-compatibility is retained, even though it might make sense to normalize some of the attributes.
Example return value:
"certificate": {
            "arn": "arn:aws:acm:us-west-1:account:certificate/f85abf9d-4bda-4dcc-98c3-770664a68243",
            "domain_name": "acm1.949058644.ansible.com",
            "tags": {
                "Application": "search",
                "Environment": "development",
                "Name": "ansible-test-78006277-398b5796f999_949058644_1"
            }
        }

Integration tests:

The openssl_certificate task is deprecated. Migrate to x509_certificate.
The signature_algorithms attribute is no longer supported by the new x509_certificate task. Using selfsigned_digest instead.
The integration tests for the aws_acm module pass locally.
I see ansible/ansible#67788 has been closed, but tests/integration/targets/aws_acm/aliases still has unstable. I am not sure what to do about it. I was able to run the tests in my local workspace after making the above changes.

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Sebastien Rosset <None>
Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action action plugin community_review do_not_backport This PR should not be backported to stable- branches unless absolutely necessary feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module new_module New module new_plugin New plugin plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants