-
Notifications
You must be signed in to change notification settings - Fork 319
[Storage] content_length -> size for PageBlobClient create API
#3400
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
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
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 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_lengthparameters tosizein PageBlobClient'screate()andresize()methods for better clarity - Consolidated
BlobImmutabilityPolicyModeintoImmutabilityPolicyModewith updated serialization format (lowercase) and addedMutablevariant - Updated immutability policy APIs: made
expirya required parameter inset_immutability_policy()and simplified return types toResponse<(), 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) |
|
|
||
| ### Breaking Changes | ||
|
|
Copilot
AI
Dec 5, 2025
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.
Duplicate "### Breaking Changes" section header. There are two "### Breaking Changes" sections at lines 11 and 17. These should be merged into a single section.
| ### Breaking Changes |
|
|
||
| - 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. |
Copilot
AI
Dec 5, 2025
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.
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."
| - 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. |
| - 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. | ||
|
|
Copilot
AI
Dec 5, 2025
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.
Missing CHANGELOG entries for significant breaking changes to immutability policy APIs. The following breaking changes should be documented:
- Renamed
BlobImmutabilityPolicyModeenum toImmutabilityPolicyMode - Changed string serialization format for
ImmutabilityPolicyModefrom PascalCase ("Locked", "Unlocked") to lowercase ("locked", "unlocked", "mutable") - Added
Mutablevariant toImmutabilityPolicyModeenum - Changed
BlobClient::set_immutability_policy()method signature to requireexpiryparameter (previously optional in options) - Changed return type from
Response<BlobClientSetImmutabilityPolicyResult, NoFormat>toResponse<(), NoFormat>forset_immutability_policy() - Changed return type from
Response<BlobClientDeleteImmutabilityPolicyResult, NoFormat>toResponse<(), NoFormat>fordelete_immutability_policy() - Changed return type from
Response<BlobClientUndeleteResult, NoFormat>toResponse<(), NoFormat>forundelete() - Removed result header traits:
BlobClientDeleteImmutabilityPolicyResultHeaders,BlobClientSetImmutabilityPolicyResultHeaders, andBlobClientUndeleteResultHeaders
| - 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`. |
As title states.
.tsp: Azure/azure-rest-api-specs#39097