feat(services): support conditional delete for Azure services - #8142
Merged
Conversation
Xuanwo
marked this pull request as ready for review
August 25, 2026 09:56
PsiACE
approved these changes
Aug 25, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #8141.
Rationale for this change
delete_with_if_matchenables compare-and-delete workflows such as lease release and orphan cleanup. Azure Blob Storage and Azure Data Lake Storage Gen2 support conditional delete requests, but their OpenDAL services do not currently advertise or forward this condition.What changes are included in this PR?
If-Matchin Azure Blob single deletes and in each batch subrequest. Preserve eachOpDeletein batch results so conditions remain associated with their paths.If-Matchin ADLS Path Delete requests, including recursive-delete continuation requests.Are there any user-facing changes?
Yes.
azblobandazdlsnow advertisedelete_with_if_match, so callers can useop.delete_with(path).if_match(etag). A stale ETag returnsConditionNotMatchwithout deleting the replacement object.Azure Files remains unchanged because its Delete File REST API does not expose an
If-Matchcondition.AI Usage Statement
AI materially assisted with implementation and validation. The contributor directed and reviewed the API scope and service behavior. The implementation was checked against the official Azure REST API contracts; live Azure behavior tests were not run locally because service credentials were unavailable.