-
Notifications
You must be signed in to change notification settings - Fork 318
[Storage] undelete for BlobClient
#3389
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?
[Storage] undelete for BlobClient
#3389
Conversation
…p to have softdelete enabled
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.
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 |
.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