-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
implement S3 native object lock #8884
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
Conversation
ad12ee0
to
649dd3d
Compare
1265be6
to
66f9f51
Compare
649dd3d
to
bf92734
Compare
d97e8f8
to
caecae3
Compare
bf92734
to
c034bae
Compare
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.
LGTM! Thanks for linking the docs, that was very helpful :-)
localstack/services/s3/v3/models.py
Outdated
self.is_current = True | ||
|
||
@staticmethod | ||
def is_locked(*_, **__) -> bool: |
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.
def is_locked(*_, **__) -> bool: | |
def is_locked(*args, **kwargs) -> bool: |
i know the IDE complains, but this is more readable :-)
if you "just can't" the warnings, you can also:
def is_locked(*_args, **_kwargs) -> bool:
a787d67
to
182905f
Compare
caecae3
to
9628b50
Compare
Motivation
Implement the ObjectLock functionality in the new native S3 provider. This was partially implemented in our provider in order to fix Moto.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-overview.html
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html
https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html
Changes
This PR adds the necessary API operations as well as a good amount of snapshot tests.
GetObjectLockConfiguration
PutObjectLockConfiguration
GetObjectLegalHold
PutObjectLegalHold
GetObjectRetention
PutObjectRetention