[Storage] undelete for BlobClient#3389
Merged
vincenttran-msft merged 4 commits intoAzure:mainfrom Dec 8, 2025
Merged
Conversation
…p to have softdelete enabled
jalauzon-msft
approved these changes
Dec 4, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds blob undelete functionality to the Azure Storage Blob SDK for Rust, enabling recovery of soft-deleted blobs. The changes include both the API implementation and test infrastructure updates to support soft delete testing.
- Implements
undeletemethod onBlobClientto restore soft-deleted blobs - Enables soft delete with 1-day retention on the test storage account
- Updates generated code from upstream Azure REST API specifications (commit e7ed1502)
Reviewed changes
Copilot reviewed 7 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/test-resources.bicep | Adds blob services configuration with soft delete and container delete retention policies (1-day retention for testing) |
| sdk/storage/azure_storage_blob/tsp-location.yaml | Updates commit reference for TypeSpec code generation |
| sdk/storage/azure_storage_blob/tests/blob_client.rs | Adds comprehensive test for undelete functionality, verifying blob can be restored after soft delete |
| sdk/storage/azure_storage_blob/src/clients/blob_client.rs | Adds public undelete method with proper documentation |
| sdk/storage/azure_storage_blob/src/models/mod.rs | Updates exports to include BlobClientUndeleteOptions and removes obsolete types |
| sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs | Consolidates immutability policy types, removing duplicate BlobImmutabilityPolicyMode |
| sdk/storage/azure_storage_blob/src/generated/models/method_options.rs | Refactors immutability policy options structure |
| sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs | Updates header traits to use consolidated ImmutabilityPolicyMode |
| sdk/storage/azure_storage_blob/src/generated/models/enums_serde.rs | Removes duplicate enum serialization code |
| sdk/storage/azure_storage_blob/src/generated/models/enums_impl.rs | Updates ImmutabilityPolicyMode enum to use lowercase variants and adds "mutable" variant |
| sdk/storage/azure_storage_blob/src/generated/models/enums.rs | Removes duplicate BlobImmutabilityPolicyMode, updates ImmutabilityPolicyMode documentation |
| sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs | Implements generated undelete method and refactors immutability policy methods |
| sdk/storage/azure_storage_blob/assets.json | Updates test assets tag reference |
| sdk/storage/.dict.txt | Adds "Undeletes" to dictionary for spell checking |
jalauzon-msft
approved these changes
Dec 8, 2025
jalauzon-msft
approved these changes
Dec 8, 2025
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.
.tsp:Azure/azure-rest-api-specs#39068This PR adds the following:
undeleteAPI for BlobClienttest-resources.bicepSanity run of the live tests to ensure that enabling soft-delete didn't cause any weird failures: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5634022&view=results