Skip to content
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

[Storage] Upgrade API version to 2020-08-01-preview, and version to 18.0.0-beta #16355

Merged
merged 3 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions eng/mgmt/mgmtmetadata/storage_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated
2020-08-10 10:19:04 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2020-08-preview --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated
2020-11-02 05:45:33 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 81ee445f0291ea1b284509dd42b3d37aea3799d7
Commit: f11c7e7c36e28ca3b0d575cc4241c1e2a4099caa
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4283
Bootstrapper version: autorest@2.0.4413
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Storage_2019-06-01;</AzureApiTag>
<AzureApiTag>Storage_2020-08-01-preview;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
15 changes: 15 additions & 0 deletions sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## Microsoft.Azure.Management.Storage release notes

### Changes in 18.0.0-beta
- Upgrade to rest api version 2020-08-01-preview
- Support enanble ContainerDeleteRetentionPolicy in BlobServices properties
- Support enable LastAccessTimeTrackingPolicy in BlobServices properties
- Support DaysAfterLastAccessTimeGreaterThan,EnableAutoTierToHotFromCool in ManagementPolicy BaseBlob Actions
- Support List deleted containers
- Support enable ProtocolSettings.Smb.Multichannel on FileServices properties
- Support ResourceAccessRule in Microsoft.Azure.Management.Storage.Models.NetworkRuleSet
- Support Set ExtendedLocation in create storage account
- Support Blob Inventory rule of storage account

**Breaking changes**

- In StorageManagementClient.FileServices.SetServiceProperties(), add a madatory parameter with type Microsoft.Azure.Management.Storage.Models.FileServiceProperties, to input all FileService properties, and remove 2 parameters to input FileService properties: cors, shareDeleteRetentionPolicy.
Copy link
Member

Choose a reason for hiding this comment

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

Is this just a temporary change for the preview, or do you intend to go through with this change in the stable API? This will need to go through a breaking change review before you can release as a stable api

Copy link
Member Author

Choose a reason for hiding this comment

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

This breaking will also in SDK of stable API version. How to go through a breaking change review?
I would suggest to merge this PR then start the process to breaking review (or resolve the breaking).

Actually, this is not caused by the swagger (or API) breaking, but caused by a limitation of autorest.

We have config payload-flattening-threshold: 2 in https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.csharp.md#common-c-settings, so when a object has <= 2 child properties, in autorest generated code, functions will use the child properties as input in stead of the object; when the object has >=3 properties, functions will use the object as input.

So when FileServiceProperties properties count increase from 2 to 3, the function SetServiceProperties() will change from input the file service properties to input FileServiceProperties object.

This kind of breaking happens frequently in .net SDK. Do you have any idea how to resolve this?
If we change the payload-flattening-threshold: 2 to a bigger value, it will also cause many of the existing API breaking.

Copy link
Member

Choose a reason for hiding this comment

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

We can likely solve it in individual cases with customizations. Can you send me an email, so I can bring in some generator folks?


### Changes in 17.2.0
- Update BlobServiceProperties.RestorePolicy: add new property "MinRestoreTime", deprecate old property "LastEnabledTime"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {35BE074F-989A-4527-8A86-9D852CD4126D}
EndGlobalSection
EndGlobal
Loading