Skip to content

Conversation

@vincenttran-msft
Copy link
Member

As title states.
.tsp: Azure/azure-rest-api-specs#39097

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Dec 5, 2025
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure_storage_blob

@vincenttran-msft vincenttran-msft marked this pull request as ready for review December 5, 2025 03:24
Copilot AI review requested due to automatic review settings December 5, 2025 03:24
Copilot finished reviewing on behalf of vincenttran-msft December 5, 2025 03:26
Copy link
Contributor

Copilot AI left a 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 updates the Azure Storage Blob SDK to align with the latest TypeSpec definitions from azure-rest-api-specs. The primary changes involve renaming parameters for clarity and updating immutability policy-related APIs.

Key changes:

  • Renamed content_length/blob_content_length parameters to size in PageBlobClient's create() and resize() methods for better clarity
  • Consolidated BlobImmutabilityPolicyMode into ImmutabilityPolicyMode with updated serialization format (lowercase) and added Mutable variant
  • Updated immutability policy APIs: made expiry a required parameter in set_immutability_policy() and simplified return types to Response<(), NoFormat> for several blob operations

Reviewed changes

Copilot reviewed 4 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/storage/azure_storage_blob/tsp-location.yaml Updated commit hash reference to latest TypeSpec definitions
sdk/storage/azure_storage_blob/src/models/mod.rs Removed exports for deleted immutability policy result types and headers
sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs Changed BlobImmutabilityPolicyMode to ImmutabilityPolicyMode and removed obsolete result structs
sdk/storage/azure_storage_blob/src/generated/models/method_options.rs Removed immutability_policy_expiry from options (now a required parameter)
sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs Removed header traits for deleted result types and updated references to ImmutabilityPolicyMode
sdk/storage/azure_storage_blob/src/generated/models/enums_serde.rs Removed serialization code for BlobImmutabilityPolicyMode
sdk/storage/azure_storage_blob/src/generated/models/enums_impl.rs Removed implementation for BlobImmutabilityPolicyMode and updated ImmutabilityPolicyMode with lowercase serialization and Mutable variant
sdk/storage/azure_storage_blob/src/generated/models/enums.rs Removed BlobImmutabilityPolicyMode enum and updated ImmutabilityPolicyMode with Mutable variant
sdk/storage/azure_storage_blob/src/generated/clients/page_blob_client.rs Renamed blob_content_length parameter to size in create() and resize() methods
sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs Updated immutability policy methods: made expiry required, changed return types to Response<(), NoFormat>, removed documentation for deleted header traits
sdk/storage/azure_storage_blob/src/clients/page_blob_client.rs Updated public wrapper to use size parameter name in create() method
sdk/storage/azure_storage_blob/CHANGELOG.md Added entry for create() parameter rename (incomplete - missing several breaking changes)

Comment on lines 16 to 18

### Breaking Changes

Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate "### Breaking Changes" section header. There are two "### Breaking Changes" sections at lines 11 and 17. These should be merged into a single section.

Suggested change
### Breaking Changes

Copilot uses AI. Check for mistakes.

- Changed conversion implementation from `BlobTags` to `HashMap<String, String>` from `TryFrom` to `From`.
- Added `continuation_token` to `PagerOptions` for methods that return a `Pager`.
- Renamed `content_length` to `size` for `PageBlobClient`'s `create()` method.
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CHANGELOG entry only mentions the create() method, but the resize() method also had its parameter renamed from blob_content_length to size. The entry should be updated to reflect both methods, e.g., "Renamed content_length to size for PageBlobClient's create() method and blob_content_length to size for PageBlobClient's resize() method."

Suggested change
- Renamed `content_length` to `size` for `PageBlobClient`'s `create()` method.
- Renamed `content_length` to `size` for `PageBlobClient`'s `create()` method and `blob_content_length` to `size` for `PageBlobClient`'s `resize()` method.

Copilot uses AI. Check for mistakes.
- Changed conversion implementation from `BlobTags` to `HashMap<String, String>` from `TryFrom` to `From`.
- Added `continuation_token` to `PagerOptions` for methods that return a `Pager`.
- Renamed `content_length` to `size` for `PageBlobClient`'s `create()` method.

Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing CHANGELOG entries for significant breaking changes to immutability policy APIs. The following breaking changes should be documented:

  1. Renamed BlobImmutabilityPolicyMode enum to ImmutabilityPolicyMode
  2. Changed string serialization format for ImmutabilityPolicyMode from PascalCase ("Locked", "Unlocked") to lowercase ("locked", "unlocked", "mutable")
  3. Added Mutable variant to ImmutabilityPolicyMode enum
  4. Changed BlobClient::set_immutability_policy() method signature to require expiry parameter (previously optional in options)
  5. Changed return type from Response<BlobClientSetImmutabilityPolicyResult, NoFormat> to Response<(), NoFormat> for set_immutability_policy()
  6. Changed return type from Response<BlobClientDeleteImmutabilityPolicyResult, NoFormat> to Response<(), NoFormat> for delete_immutability_policy()
  7. Changed return type from Response<BlobClientUndeleteResult, NoFormat> to Response<(), NoFormat> for undelete()
  8. Removed result header traits: BlobClientDeleteImmutabilityPolicyResultHeaders, BlobClientSetImmutabilityPolicyResultHeaders, and BlobClientUndeleteResultHeaders
Suggested change
- Renamed `BlobImmutabilityPolicyMode` enum to `ImmutabilityPolicyMode`.
- Changed string serialization format for `ImmutabilityPolicyMode` from PascalCase ("Locked", "Unlocked") to lowercase ("locked", "unlocked", "mutable").
- Added `Mutable` variant to `ImmutabilityPolicyMode` enum.
- Changed `BlobClient::set_immutability_policy()` method signature to require `expiry` parameter (previously optional in options).
- Changed return type from `Response<BlobClientSetImmutabilityPolicyResult, NoFormat>` to `Response<(), NoFormat>` for `set_immutability_policy()`.
- Changed return type from `Response<BlobClientDeleteImmutabilityPolicyResult, NoFormat>` to `Response<(), NoFormat>` for `delete_immutability_policy()`.
- Changed return type from `Response<BlobClientUndeleteResult, NoFormat>` to `Response<(), NoFormat>` for `undelete()`.
- Removed result header traits: `BlobClientDeleteImmutabilityPolicyResultHeaders`, `BlobClientSetImmutabilityPolicyResultHeaders`, and `BlobClientUndeleteResultHeaders`.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant