-
Notifications
You must be signed in to change notification settings - Fork 472
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
feat: Add if_none_match for write #5129
Conversation
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 mostly looks good to me. To make this feature work, we should also add a flag in Capability
called write_with_if_none_match
. Additionally, we can add a behavior test based on this.
/// This prevents overwriting of existing objects with identical key names. | ||
/// And must use the * (asterisk) value with this parameter | ||
/// | ||
/// If file exists, an error with kind [`ErrorKind::ConditionNotMatch`] will be returned. |
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.
Perhaps we can also provide an example to demonstrate how to handle this error.
Thank you very much for your careful help. I have revised all your comments. 😄 |
Hi, the tests failed because the version we used for testing doesn't support this feature yet. The upstream added this feature in this commit. Would you like to upgrade MinIO to the latest version, such as |
I'm sorry I didn't think of that. Thank you for your careful help. |
Signed-off-by: LeeHao <[email protected]>
Signed-off-by: LeeHao <[email protected]>
Thanks for the tip! |
Can you help me review the code, I have rebase the code to the latest. |
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.
|
Sure, I appreciate to be able to do this work! 😄 But I don't have gcs and azblob acounts. What better way than to sign up for gcs and azblob account? |
Which issue does this PR close?
Closes #5097
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?
Yes, add an option
if_none_match
forwrite_with
.