-
Notifications
You must be signed in to change notification settings - Fork 4k
Refactor template deployment cmdlets. #10798
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
Conversation
…actor # Conflicts: # src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs
…actor # Conflicts: # src/Blueprint/Blueprint.Test/Blueprint.Test.csproj # src/Resources/ResourceManager/ResourceManager.csproj # src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs # src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.PolicyTests/TestPolicyDefinitionCRUDAtManagementGroup.json # src/Resources/Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.PolicyTests/TestPolicyDefinitionMode.json
For PR big like this, a cmdlet design review is required. As for the online-version, you can add them manually. |
Created an issue here: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/462 |
…actor # Conflicts: # src/Resources/Resources/ChangeLog.md
HelpMessage = "The name of deployment.")] | ||
[ValidateNotNullOrEmpty] | ||
public string Name { get; set; } | ||
|
||
[Alias("DeploymentId", "ResourceId")] | ||
[Parameter(ParameterSetName = GetAzureDeploymentCmdlet.DeploymentIdParameterSet, Mandatory = false, | ||
[Parameter(ParameterSetName = GetAzureSubscriptionDeploymentCmdlet.DeploymentIdParameterSet, Mandatory = true, |
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.
Changing an optional parameter to mandatory is a breaking change, and it cannot be checked in until next breaking change release which is ~May.
I agree that it should be mandatory, but my suggestion is to add a breaking change attribute and make the change later.
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 also the cause to CI failure
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 shouldn't be breaking. "Id" is the only parameter in this parameter set. If you don't specify the "id" parameter, you'll land with the default parameter set which is "GetByDeploymentName".
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.
I can change it back to "mandatory" to false if that's the right thing..
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.
Right.. then it's a false positive. Please read Debugging StaticAnalysis Errors to suppress the warning.
|
||
Gets deployment operations with name "Deploy01" at the management group "myMG". | ||
|
||
### Example 2: Get a deployment and get its deployment operations |
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.
Nice examples!
@isra-fel I've made the changes. can you help take another look? |
…actor # Conflicts: # src/Resources/Resources/ChangeLog.md
Sorry for the late response. I believe you are right about it not being a breaking change. If you could revert the last commit and suppress the warning I would be able to merge. Thanks |
@isra-fel so the only issue is the CI run gave an error if I make that change. Is that an bug in the CI run? |
Our CI runs static analysis on the code. One of the checks is for breaking changes. The error was that it detected one (potential) breaking change. According to your comment it did not break anything after all, so we can suppress the error by following these instructions: https://github.com/Azure/azure-powershell/blob/master/documentation/Debugging-StaticAnalysis-Errors.md#breaking-changes |
updated. can you help take a look and merge? |
/azp run azure-powershell - powershell-core |
Azure Pipelines successfully started running 1 pipeline(s). |
Refactor template deployment cmdlets.
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added