-
Notifications
You must be signed in to change notification settings - Fork 487
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,delete}DefaultRetention APIs #935
add arg builder to {set,get,delete}DefaultRetention APIs #935
Conversation
MinioClient s3Client = | ||
new MinioClient("https://s3.amazonaws.com", "YOUR-ACCESSKEYID", "YOUR-SECRETACCESSKEY"); | ||
|
||
ObjectLockConfiguration config = |
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.
IMO we should have a complete example, like creating the bucket, setting the default retention and then fetching it. So that user just have to edit the credentials and run the file.
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 we need to be specific to examples for an API. Its not possible to run any example without modifying essentials like endpoint, credentials, bucket/object names, respective variables etc and some operations are chargeable in some service providers.
We wouldn't consider examples as tests.
cb399ba
to
eb5e515
Compare
624ae25
to
762df3c
Compare
} finally { | ||
client.removeBucket(RemoveBucketArgs.builder().bucket(bucketName).build()); | ||
} | ||
|
||
mintSuccessLog("getDefaultRetention (String bucketName)", null, startTime); | ||
|
||
mintSuccessLog(methodName, null, startTime); |
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.
The retention mode and duration can be logged as arguments
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.
It wouldn't be useful because the failure may happen any one of two checks. I am not favour of mint args because stack trace is the best to find the issue.
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.
Actually if the try-catch
and exception handling is also moved to the new method (testGetDefaultRetention
) then the args logging can be done.
762df3c
to
98f74f1
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 with one minor comment
} finally { | ||
client.removeBucket(RemoveBucketArgs.builder().bucket(bucketName).build()); | ||
} | ||
|
||
mintSuccessLog("getDefaultRetention (String bucketName)", null, startTime); | ||
|
||
mintSuccessLog(methodName, null, startTime); |
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.
Actually if the try-catch
and exception handling is also moved to the new method (testGetDefaultRetention
) then the args logging can be done.
98f74f1
to
7517d83
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
No description provided.