Skip to content

[HDInsight] Call out breaking changes #9999

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

Merged
merged 4 commits into from
Sep 17, 2019

Conversation

aim-for-better
Copy link
Member

@aim-for-better aim-for-better commented Sep 10, 2019

Description

This PR is related to previous PR #9941 . In PR #9941 we did some breaking changes and merged into Az.HDInsight-preview branch. This PR is in order to call out breaking changes in master branch.

  1. Deprecated Get/Enable/Disable-AzHDInsightOMS and replaced them with Get/Enable/Disable-AzHDInsightMonitoring
  2. Deprecated Grant/Revoke-AzHDInsightRdpServicesAccess cmdlets with no replacement.
  3. Change the output type of Get-AzHDInsightProperty and Set-AzHDInsightGatewayCredential
  4. remove a outdated breaking change notes

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@aim-for-better aim-for-better force-pushed the CallOutBreakingChange branch 3 times, most recently from 9752e4a to dfb37b8 Compare September 11, 2019 02:41
@@ -0,0 +1,5 @@
"AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
Copy link
Contributor

@msJinLei msJinLei Sep 11, 2019

Choose a reason for hiding this comment

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

These lines will suppress breaking change warnings of static analysis, which are not expected in a breaking change notice release.

Copy link
Member Author

@aim-for-better aim-for-better Sep 11, 2019

Choose a reason for hiding this comment

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

Hi @msJinLei , I want to call out breaking change and remove outdated alias in the same PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @msJinLei , I want to call out breaking change and remove outdated alias in the same PR.

Two separate prs are expected in that cases. One for breaking changes preview release & one for breaking changes notice release.

Copy link
Member Author

@aim-for-better aim-for-better Sep 11, 2019

Choose a reason for hiding this comment

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

Hi @msJinLei , I want to call out breaking change and remove outdated alias in the same PR.

Two separate prs are expected in that cases. One for breaking changes preview release & one for breaking changes notice release.

Hi , I have updated the PR, this PR only call out breaking change. But we still add suppression otherwise I will failed at analyse phrase for a false positive violdation error.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. I will resolve it if the previous issues are fixed.

using System;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation()]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please provide with an instruction for the customers who are using the cmdlet on how they should do with their jobs and scripts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please provide with an instruction for the customers who are using the cmdlet on how they should do with their jobs and scripts.

Hi @msJinLei , I think that we don't have to do this. There is no replacement of this cmdlet. This cmdlet is related with specific os type cluster which has been deprecated. Customers can't use this cmdlet any more. We have removed this cmdlet in previous PR #9941 .

Copy link
Member Author

Choose a reason for hiding this comment

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

Please provide with an instruction for the customers who are using the cmdlet on how they should do with their jobs and scripts.

Hi @msJinLei , I think that we don't have to do this. There is no replacement of this cmdlet. This cmdlet is related with specific os type cluster which has been deprecated. Customers can't use this cmdlet any more. We have removed this cmdlet in previous PR #9941 .

when customer use this cmdlet they will get a message: "The cmdlet is being deprecated. There will be no replacement for it." This is actually a good instruction.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about the previous scripts that contains this cmdlet. How the users are proposed to modify their scripts?

Copy link
Member Author

@aim-for-better aim-for-better Sep 12, 2019

Choose a reason for hiding this comment

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

What about the previous scripts that contains this cmdlet. How the users are proposed to modify their scripts?

Hi @msJinLei , I have updated the PR and added instructions reference AddAzureASAccount.cs

using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation()]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

Copy link
Member Author

Choose a reason for hiding this comment

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

Ditto

the same with above.

Copy link
Contributor

Choose a reason for hiding this comment

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

See above.

Copy link
Member Author

Choose a reason for hiding this comment

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

See above.

Hi @msJinLei , I have updated the PR and added instructions reference AddAzureASAccount.cs

@msJinLei
Copy link
Contributor

You have removed outdated breaking change notes. Actually I misunderstood your purpose previously. You can keep it in this patch.

@aim-for-better
Copy link
Member Author

aim-for-better commented Sep 12, 2019

You have removed outdated breaking change notes. Actually I misunderstood your purpose previously. You can keep it in this patch.

Thanks I have added back. Thanks for your review.

Remove outdated breaking change
Add suppression
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightConfigValue"),OutputType(typeof(AzureHDInsightConfig))]
[Alias("Add-AzHDInsightConfigValues")]
Copy link
Member

Choose a reason for hiding this comment

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

So, to be clear, if you did not remove this alias at the last breaking chaneg release, you cannot remove it now. If you want to remove it at the next breaking change release, then leave the braking change notce and the alias here, and you can remove it in November.

Otherwise, please keep the alias and removing the braking change notice is OK.

Copy link
Member

Choose a reason for hiding this comment

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

Note that removing this alias is one of the current static analysis failures preventing us from merging this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

So, to be clear, if you did not remove this alias at the last breaking chaneg release, you cannot remove it now. If you want to remove it at the next breaking change release, then leave the braking change notce and the alias here, and you can remove it in November.

Otherwise, please keep the alias and removing the braking change notice is OK.

Hi @markcowl Thanks for your comments. I decided to keep the alias and breaking change notice. I will remove it in November.

Copy link
Member Author

@aim-for-better aim-for-better Sep 16, 2019

Choose a reason for hiding this comment

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

Note that removing this alias is one of the current static analysis failures preventing us from merging this PR.

As for static analysis failure, per my side I think it is false positive validation error.
Because the cmdlets in the breaking change result has been removed at the version 2.0.1.
And I have added suppression.

More details:
I exec msbuild build.proj /t:StaticAnalysis /p:Configuration=Debug at my local machine, I got the following breaking changes:

AssemblyFileName ClassName Target Severity ProblemId Description Remediation
Microsoft.Azure.PowerShell.Cmdlets.HDInsight.dll Microsoft.Azure.Commands.HDInsight.GrantAzureHDInsightHttpServicesAccessCommand Grant-AzHDInsightHttpServicesAccess 0 1000 The cmdlet 'Grant-AzHDInsightHttpServicesAccess' has been removed and no alias was found for the original cmdlet name. Add the cmdlet 'Grant-AzHDInsightHttpServicesAccess' back to the module, or add an alias to the original cmdlet name.
Microsoft.Azure.PowerShell.Cmdlets.HDInsight.dll Microsoft.Azure.Commands.HDInsight.RevokeAzureHDInsightHttpServicesAccessCommand Revoke-AzHDInsightHttpServicesAccess 0 1000 The cmdlet 'Revoke-AzHDInsightHttpServicesAccess' has been removed and no alias was found for the original cmdlet name. Add the cmdlet 'Revoke-AzHDInsightHttpServicesAccess' back to the module, or add an alias to the original cmdlet name.

I don't remove this two cmdlets in this PR, they have been removed at the version 2.0.1.

[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightProperty"),OutputType(typeof(CapabilitiesResponse))]
[Alias("Get-AzHDInsightProperties")]
Copy link
Member

Choose a reason for hiding this comment

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

Same comment. You cannot remove this alias until a breaking change release. If you want to remove the alias at the next breaking change release in November, then leave this alias and the breaking change attribute here and you can remove it then.

Otherwise remove the old breakign change attribute and leave the alias.

This is the other thing that is causing static analysis failures, which prevent us from merging this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same comment. You cannot remove this alias until a breaking change release. If you want to remove the alias at the next breaking change release in November, then leave this alias and the breaking change attribute here and you can remove it then.

Otherwise remove the old breakign change attribute and leave the alias.

This is the other thing that is causing static analysis failures, which prevent us from merging this PR.

Thanks. The same with above.

using System;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation("3.0.0")]
Copy link
Member

Choose a reason for hiding this comment

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

You need to provide a good, customer-facing string here. What should the customer do if this cmdlet is not here to grant access? Is there a different mechanism? Is RDP service being discontinued? The customer needs to be able to use this string to figure out how to change their script.

Copy link
Member Author

Choose a reason for hiding this comment

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

You need to provide a good, customer-facing string here. What should the customer do if this cmdlet is not here to grant access? Is there a different mechanism? Is RDP service being discontinued? The customer needs to be able to use this string to figure out how to change their script.

Fixed.

using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation("3.0.0")]
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as with Grant above.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same comment as with Grant above.

Fixed.

@@ -0,0 +1,3 @@
"AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation"
"Microsoft.Azure.PowerShell.Cmdlets.HDInsight.dll","Microsoft.Azure.Commands.HDInsight.GrantAzureHDInsightHttpServicesAccessCommand","Grant-AzHDInsightHttpServicesAccess","0","1000","The cmdlet 'Grant-AzHDInsightHttpServicesAccess' has been removed and no alias was found for the original cmdlet name.","Add the cmdlet 'Grant-AzHDInsightHttpServicesAccess' back to the module, or add an alias to the original cmdlet name."
Copy link
Member

Choose a reason for hiding this comment

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

These still need to be removed.

Copy link
Member Author

@aim-for-better aim-for-better Sep 16, 2019

Choose a reason for hiding this comment

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

These still need to be removed.

Removed.

But I still have static analysis error at my local machine even through I executed static analysis under newest master branch.

@markcowl
Copy link
Member

@aim-for-better Code complete for this release is EOD Monday. Please make requested changes by then if you want to be in the release.

@aim-for-better
Copy link
Member Author

@aim-for-better Code complete for this release is EOD Monday. Please make requested changes by then if you want to be in the release.

Thanks for your reminder.

@aim-for-better
Copy link
Member Author

@aim-for-better Code complete for this release is EOD Monday. Please make requested changes by then if you want to be in the release.

I have updated the PR.

using System;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation("This cmdlet will be deprecated in an upcoming breaking change release 3.0.0. Please use the cmdlet Set-AzHDInsightGatewayCredential to set connection credential.")]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[CmdletDeprecation("This cmdlet will be deprecated in an upcoming breaking change release 3.0.0. Please use the cmdlet Set-AzHDInsightGatewayCredential to set connection credential.")]
[CmdletDeprecation("This cmdlet will be deprecated in an upcoming breaking change release. Please use the cmdlet Set-AzHDInsightGatewayCredential to set a connection credential.")]

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

using System.Management.Automation;

namespace Microsoft.Azure.Commands.HDInsight
{
[CmdletDeprecation("Clusters based Windows Os Type don't be supported, this cmdlet will be deprecated in an upcoming breaking change release 3.0.0 with no replacement. Please create cluster based Linux Os Type.")]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
[CmdletDeprecation("Clusters based Windows Os Type don't be supported, this cmdlet will be deprecated in an upcoming breaking change release 3.0.0 with no replacement. Please create cluster based Linux Os Type.")]
[CmdletDeprecation("Clusters using Windows Os Type will not be supported in the future, this cmdlet will be deprecated in an upcoming breaking change release with no replacement. Please create a cluster using Linux Os Type instead.")]

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

@erich-wang
Copy link
Member

/azp run azure-powershell - security-tools

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@erich-wang
Copy link
Member

Merge as Admin since there's issue in ADO pipeline notification.

@erich-wang erich-wang merged commit ef3f6bf into Azure:master Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants