-
Notifications
You must be signed in to change notification settings - Fork 484
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
add arg builder to set/get objectRetention API #938
Conversation
throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, | ||
InsufficientDataException, InternalException, ErrorResponseException, | ||
InvalidBucketNameException, InvalidPortException, InvalidEndpointException, | ||
RegionConflictException, IllegalArgumentException { |
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.
Shorten exception list by catching MinioException
.
I would recommend to have short and precise commit message to patches (including git log and github PR title/description). |
d121a7a
to
19d2729
Compare
19d2729
to
a9e13be
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. Please look at the build failures
functional/FunctionalTest.java
Outdated
// they were unprotected if you have the s3:bypassGovernanceMode permission. These | ||
// operations include deleting an object version, shortening the retention period, or | ||
// removing the Object Lock by placing a new lock with empty parameters. | ||
ZonedDateTime shortenedRetentionUntil = ZonedDateTime.now().plusDays(1); |
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.
- I think you are testing
bypassGovernanceMode()
here. If so it needs to be merged in above. - I guess
bypassGovernanceMode
allow to changeRetention
whereRetentionUntil
time could be higher or lower. If this is the test you want to do, you could have the test doing both.
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.
This test is to set retention with a shortened retention period. As per s3 , retention period can shortened only by setting bypassGovernance to true.
You can perform operations on object versions that are locked in governance mode as if they were unprotected if you have the s3:BypassGovernanceRetention permission. These operations include deleting an object version, shortening the retention period, or removing the Object Lock by placing a new lock with empty parameters.
bypassGovernanceMode
is tested in all the related functional test test as i set the empty lock by setting bypassGovernance to true and then i am able to delete the object.
a9e13be
to
c9fbc2a
Compare
c9fbc2a
to
03c418f
Compare
03c418f
to
04a9374
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
b726bc0
to
92d0864
Compare
2a89bb0
to
b0a6af5
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
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
Added some functional Test to set the object retention with governance mode and then set the lock with empty params so that object can be removed.
The test case will will until PR minio/minio#9677 is merged and reflected in play.