-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Customer Assigned Fault Domain on VM referencing VMSS - SDK and Tests #16844
Customer Assigned Fault Domain on VM referencing VMSS - SDK and Tests #16844
Conversation
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
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 code changes look OK, but there are some things that are missing:
- Please add in a reference to the corresponding Swagger PR for this change
- running the generation script produces an updated metadata file in the eng directory, please add this in to the PR
- When api versions change, you need to update Az.Sdk.RP.props to change the tag to match the new api-version
- You sill need to re-record the tests and add in new tests for any new functionality
@shpa-microsoft Also, please ensure you update this branch by pulling in the latest from master. |
32f4839
to
de7685e
Compare
@markcowl Addressed your comments with some questions on offline chat. |
Can't perform tests due to ARM API release issues. Spoke offline about it. |
Hi @shpa-microsoft. There hasn't been recent engagement on this PR. Would you please be so kind as to let us know if this is still an active work stream or if the PR should be closed out? |
@@ -134,7 +138,7 @@ public async Task<AzureOperationResponse<Gallery>> UpdateWithHttpMessagesAsync(s | |||
/// <return> | |||
/// A response object containing the response body and response headers. | |||
/// </return> | |||
public async Task<AzureOperationResponse<Gallery>> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | |||
public async Task<AzureOperationResponse<Gallery>> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string select = default(string), 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.
Need a customization to fix this breaking change - essentially you need a method that implements the old parameters, with 'customHeaders' being non-optional, like the following:
public partial class GalleriesOperations {
public async Task<AzureOperationResponse<Gallery>> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary<string, List<string>> customHeaders, CancellationToken cancellationToken = default(CancellationToken))
{
return GetWithHttpMessagesAsync(resourceGroupName, galleryName, null, customHeaders, cancellationToken);
}
}
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<Gallery> GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default(CancellationToken)) | ||
public static async Task<Gallery> GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string), 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.
same comment as above
@@ -57,7 +57,7 @@ public partial interface IVirtualMachineScaleSetVMExtensionsOperations | |||
/// <exception cref="Microsoft.Rest.ValidationException"> | |||
/// Thrown when a required parameter is null | |||
/// </exception> | |||
Task<AzureOperationResponse<VirtualMachineExtension>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string vmExtensionName, VirtualMachineExtension extensionParameters, 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.
need to compensate for these breaking changes:
(1) ensure that the return type has all the properties of the previous return type
(2) add method overloads through customizing thre partial interface using the old signature
@@ -154,7 +157,7 @@ public partial interface IVirtualMachinesOperations | |||
/// <exception cref="Microsoft.Rest.ValidationException"> | |||
/// Thrown when a required parameter is null | |||
/// </exception> | |||
Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | |||
Task<AzureOperationResponse> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), 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.
Need to add overloads as above to fix these breakign changes
[JsonProperty(PropertyName = "contentType")] | ||
public string ContentType { get; set; } | ||
[JsonProperty(PropertyName = "manageActions")] | ||
public UserArtifactManage ManageActions { get; set; } |
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 - you will have to maintain a ContentType property, even if unused
/// Gets or sets required. The fileName of the artifact. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "fileName")] | ||
public string FileName { get; set; } |
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.
Cannot trmoeve this property - must maintain the property
@@ -74,10 +74,10 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl | |||
/// <param name='cancellationToken'> | |||
/// The cancellation token. | |||
/// </param> | |||
public async Task<AzureOperationResponse<VirtualMachineExtension>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string vmExtensionName, VirtualMachineExtension extensionParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) | |||
public async Task<AzureOperationResponse<VirtualMachineScaleSetVMExtension>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string vmExtensionName, VirtualMachineScaleSetVMExtension extensionParameters, 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.
Same issues as above:
(1) Need to verify that return tyoe contains all the properties of the previous return type
(2) Need to add a customization to implement the old parameter set, as above.
This applies for all the similar breaking method signature changes in this file
@@ -42,7 +42,7 @@ public static partial class VirtualMachineScaleSetVMExtensionsOperationsExtensio | |||
/// <param name='extensionParameters'> | |||
/// Parameters supplied to the Create Virtual Machine Extension operation. | |||
/// </param> | |||
public static VirtualMachineExtension CreateOrUpdate(this IVirtualMachineScaleSetVMExtensionsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string vmExtensionName, VirtualMachineExtension extensionParameters) | |||
public static VirtualMachineScaleSetVMExtension CreateOrUpdate(this IVirtualMachineScaleSetVMExtensionsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string vmExtensionName, VirtualMachineScaleSetVMExtension extensionParameters) |
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.
Same as in previous file - need to add customizations to fix these breaking changes
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) | ||
public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), 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.
need to add an overload to fix this breaking change
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) | ||
public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), 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.
need to add an overload to fix this breaking change
@shpa-microsoft Marked the breaking changes that need to be fixed through customization |
de7685e
to
061b946
Compare
@shpa-microsoft It looks like this PR is out of date, can you fix the merge conflicts? |
@markcowl all the comments made for breaking changes are unrelated to my changes; and generated automatically with autorest. Is there a way I only regenerate my code for this PR? |
061b946
to
25285c7
Compare
@shpa-microsoft There is a discussion about these API changes, and a proposed resolution on the compute team. Please contact @Sandido for details. |
Api pull request Azure/azure-rest-api-specs#11409
Do not merge, this PR is to confirm that .Net SDK code can be generated from Swagger change.