-
Notifications
You must be signed in to change notification settings - Fork 703
feat(s3): add conditional headers (If-Match, If-None-Match) for copy/… #7115
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
base: main
Are you sure you want to change the base?
Conversation
a53bc24 to
996a20c
Compare
cc26198 to
a2fe311
Compare
Xuanwo
left a comment
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.
Most changes LGTM, thank you for working on this!
| copy_with_if_match: true, | ||
|
|
||
| list: true, | ||
| rename: false, |
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.
Seems we changed list: true to rename: false? Why this change?
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.
My apologies, it seems list: true was accidentally removed during the rename capability update. I have restored it. We need rename: false to force the Copy + Delete polyfill because S3 doesn't support native rename, but list: true is definitely required i guess sir ??
edada25 to
768b8b5
Compare
…delete Signed-off-by: Shashank Singh <[email protected]>
…delete Signed-off-by: Shashank Singh <[email protected]>
Signed-off-by: Shashank Singh <[email protected]>
Signed-off-by: Shashank Singh <[email protected]>
768b8b5 to
d08278d
Compare
Which issue does this PR close?
Closes #7090 .
Rationale for this change
AWS S3 now supports conditional headers (If-Match and If-None-Match) for CopyObject and DeleteObject operations, enabling atomic operations and preventing race conditions in concurrent scenarios. This PR adds support for these headers to OpenDAL's S3 service, bringing it to feature parity with AWS S3's latest capabilities and matching the existing implementation in the Azure Blob service.
What changes are included in this PR?
This PR implements three new conditional operation capabilities for S3:
copy_with_if_not_existsIf-None-Match: *)copy_with_if_matchIf-Match: <etag>)delete_with_if_matchIf-Match: <etag>)Core Changes:
FutureCopyandFutureDeletefor user-facing APIS3 Service Implementation:
If-MatchandIf-None-MatchTesting:
Are there any user-facing changes?
Yes, this PR adds new user-facing methods:
AI Usage Statement
This PR was implemented with assistance from Claude Sonnet 4.5 through the Antigravity coding assistant. The AI helped with:
All code was reviewed, tested, and validated by the human contributor.