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

Python - S3: Object lock workflow #6641

Merged
merged 13 commits into from
Jul 16, 2024
Merged

Python - S3: Object lock workflow #6641

merged 13 commits into from
Jul 16, 2024

Conversation

ford-at-aws
Copy link
Contributor

This pull request adds an example for a object locking workflow in Python.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ford-at-aws ford-at-aws added Workflow A simple code example to show how certain tasks can be accomplished using several services and SDKs. Task A general update to the code base for language clarification, missing actions, tests, etc. labels Jul 11, 2024
@ford-at-aws ford-at-aws requested a review from a team July 11, 2024 14:54
@ford-at-aws ford-at-aws self-assigned this Jul 11, 2024
@ford-at-aws ford-at-aws requested review from rlhagerm and removed request for a team July 11, 2024 14:54
@github-actions github-actions bot added the Python This issue relates to the AWS SDK for Python (boto3) label Jul 11, 2024
@ford-at-aws ford-at-aws marked this pull request as ready for review July 11, 2024 15:01
@ford-at-aws ford-at-aws requested review from a team and removed request for rlhagerm July 11, 2024 20:10
@ford-at-aws ford-at-aws reopened this Jul 11, 2024
@ford-at-aws ford-at-aws requested review from a team and meyertst-aws and removed request for a team July 11, 2024 20:10
Copy link
Contributor

@meyertst-aws meyertst-aws left a comment

Choose a reason for hiding this comment

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

The workflow does not delete the buckets, which seems to be a requirement.
And it says cleanup is "successful" but also logs errors, which is confusing.

2024-07-12 09:52:12 [INFO] Cleanup completed successfully!

Summary of Cleanup Actions:
+------------------------------------------------+-----------+----------------------------------+---------------+---------+
| Bucket | Object | Version ID | Action | Status |
+------------------------------------------------+-----------+----------------------------------+---------------+---------+
| py-object-locking-no-lock-626 | file0.txt | null | Delete Object | Success |
| py-object-locking-no-lock-626 | file1.txt | null | Delete Object | Success |
| py-object-locking-no-lock-626 | - | - | Delete Bucket | Success |
| py-object-locking-lock-enabled-626 | file0.txt | VirfSajtC_cthWrAl9nTJaXWF00xV9oo | Delete Object | Success |
| py-object-locking-lock-enabled-626 | file1.txt | bpP1Kp_DcaduJ9U3DqMG3uujj_965Ubu | Delete Object | Success |
| py-object-locking-retention-after-creation-626 | file0.txt | x136CNeOY3leLClJVGK3DNJd_4lArOgh | Delete Object | Success |
| py-object-locking-retention-after-creation-626 | file1.txt | iKd2mkIiq1DyBtmylp1OAh1Vts46eiLZ | Delete Object | Success |
+------------------------------------------------+-----------+----------------------------------+---------------+---------+

Errors Encountered During Cleanup:
+------------------------------------------------+--------+------------+---------------+--------------------------------------------------------------------+
| Bucket | Object | Version ID | Action | Error |
+------------------------------------------------+--------+------------+---------------+--------------------------------------------------------------------+
| py-object-locking-lock-enabled-626 | - | - | Delete Bucket | Unable to disable object lock configuration after bucket creation. |
| py-object-locking-retention-after-creation-626 | - | - | Delete Bucket | Unable to disable object lock configuration after bucket creation. |

Copy link
Contributor

@meyertst-aws meyertst-aws left a comment

Choose a reason for hiding this comment

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

I do not see tests for workflow.

@ford-at-aws ford-at-aws added On Call Review complete On call review complete and removed Task A general update to the code base for language clarification, missing actions, tests, etc. labels Jul 16, 2024
@ford-at-aws ford-at-aws merged commit d9d57db into main Jul 16, 2024
17 of 19 checks passed
@ford-at-aws ford-at-aws deleted the python-object-lock branch July 16, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Call Review complete On call review complete Python This issue relates to the AWS SDK for Python (boto3) Workflow A simple code example to show how certain tasks can be accomplished using several services and SDKs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants