-
Notifications
You must be signed in to change notification settings - Fork 398
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
Support min max object size in s3_lifecycle module #2205
Support min max object size in s3_lifecycle module #2205
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 13s (non-voting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to submit this, especially for including the new integration tests.
If you take a look at the output from the tests you'll see a couple of issues:
- https://github.com/ansible-collections/community.aws/actions/runs/12383415807job/34597832812?pr=2205
- https://github.com/ansible-collections/community.aws/actions/runs/12383415807/job/34597834846?pr=2205
These boil down to
- The typo on line 63 breaks the documentation (YAML)
- We use the "black" formatting style, If you've got tox setup, then
tox -m format
it should fix the formatting.
WRT Unit tests:
Unit tests can be a PITA to implement (they live under tests/unit/plugins/modules/).
I'd really like to see some basic tests for filters_are_equal if possible. However, by moving filters_are_equal outside of compare_and_update_configuration you'll make it easier for someone (possibly me) to come along later and add them if you're not able to do so.
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 44s (non-voting) |
One other minor request: Please add a "minor_changes" changelog entry: https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 13s (non-voting) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,
Just as an FYI, you're still falling foul of some of our linting checks (tox -m lint
), however they're all whitespace related so I'll push fixes.
For the unit tests, rather than quite so much copy and paste it's also possible to use pytest's parameterize
which creates lots of copy&paste versions of the tests and means that if they start failing, it'll list all of the failed tests rather than just one.
tests/unit/plugins/modules/test_s3_lifecycle_filters_are_equal.py
Outdated
Show resolved
Hide resolved
tests/unit/plugins/modules/test_s3_lifecycle_filters_are_equal.py
Outdated
Show resolved
Hide resolved
tests/unit/plugins/modules/test_s3_lifecycle_filters_are_equal.py
Outdated
Show resolved
Hide resolved
tests/unit/plugins/modules/test_s3_lifecycle_filters_are_equal.py
Outdated
Show resolved
Hide resolved
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 5m 20s (non-voting) |
…m and maximum object size settings
2. Updated code based on the feedback from PR review
2. Included a changelog minor change fragment file. 3. Enclosed types within double quotes.
0ca971a
to
23dc3ec
Compare
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 07s (non-voting) |
Build succeeded. ❌ ansible-galaxy-importer FAILURE in 4m 18s (non-voting) |
Build succeeded (gate pipeline). ❌ ansible-galaxy-importer FAILURE in 4m 28s (non-voting) |
af56b7f
into
ansible-collections:main
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #2207 🤖 @patchback |
SUMMARY
Support the S3 lifecycle settings of minimum and maximum object size to apply the lifecycle rules.
Fixes #861
ISSUE TYPE
COMPONENT NAME
s3_lifecycle
ADDITIONAL INFORMATION