-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Microsoft.AzureStackHCI new api preview - 2021-01-01-preview #21880
Conversation
SDK code was generated based on this spec (not yet merged to master): |
@mbialecka marking as do not merge until the swagger is checked in - ci will fail until the swagger is there and you have regenerated using generate.ps1 from the checked-in version |
@mbialecka Please let me know when the swagger is checked in and will proceed. Also, please read through and check the appropriate checkboxes in the PR form above. |
@markcowl The swagger is checked in. |
|
@markcowl Do I need to do anything else to move this forward? |
@allenjzhang @markcowl ping |
@allenjzhang @m-nash @markcowl @nisha-bhatia @YalinLi0312 please help complete this |
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.
A few changes needed to mitigate breaking changes from the last stable api.
@@ -834,7 +834,7 @@ public async Task<AzureOperationResponse<Cluster>> CreateWithHttpMessagesAsync(s | |||
/// <return> | |||
/// A response object containing the response body and response headers. | |||
/// </return> | |||
public async Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | |||
public async Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, ClusterPatch cluster, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) |
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.
This is a breaking change from the previous version. If Tags can still be used to create a ClusterPatch, then this can be mitigated by adding a partial class that implements the old method in customizations. This would mean adding the same overload to 'IClustersOperations, ClustersOperations, and ClustersOperationsExtensions'. Adding a method with the signature:
public async Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, IDictionary<string, string> tags, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
That simply created a ClusterPatch object from the tags and called the existing method would work.
/// </param> | ||
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>)) | ||
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, ClusterPatch cluster) |
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.
similr method signatures needed here - again, a partial class in customizations will fix this.
@@ -144,7 +144,7 @@ public partial interface IClustersOperations | |||
/// <exception cref="Microsoft.Rest.ValidationException"> | |||
/// Thrown when a required parameter is null | |||
/// </exception> | |||
Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | |||
Task<AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, ClusterPatch cluster, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); |
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.
third place that needs this change (a partial interface in customizations wil work).
@mbialecka Please take a look at the comments and let me know if you have any questions. |
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draft
mode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csproj
andAssemblyInfo.cs
files have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]
orAzure.ResourceManager.[RP]
Management plane SDK Troubleshooting
If this is very first SDK for a services and you are adding new service folders directly under /SDK, please add
new service
label and/or contact assigned reviewer.If the check fails at the
Verify Code Generation
step, please ensure:generate.ps1/cmd
to generate this PR instead of callingautorest
directly.Please pay attention to the @microsoft.csharp version output after running
generate.ps1
. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version.Note: We have recently updated the PSH module called by
generate.ps1
to emit additional data. This would help reduce/eliminate the Code Verification check error. Please run following command:Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.