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

[Az.RecoveryServices.Backup] [8.0.0-preview] Adding autorest based commands equivalent for SDK based Policy commands in RecoveryServices module #21925

Conversation

hiaga
Copy link
Member

@hiaga hiaga commented May 25, 2023

Description

Added Autorest based commands for Az.RecoveryServices.

Checklist

  • SHOULD select appropriate branch. Cmdlets from Autorest.PowerShell should go to generation branch.
  • SHOULD make the title of PR clear and informative, and in the present imperative tense.
  • SHOULD update ChangeLog.md file(s) appropriately
    • 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 in the past tense. Add changelog in description section if PR goes into generation branch.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD have approved design review for the changes in this repository (Microsoft internal only) with following situations
    • Create new module from scratch
    • Create new resource types which are not easy to conform to Azure PowerShell Design Guidelines
    • Create new resource type which name doesn't use module name as prefix
    • Have design question before implementation
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT introduce breaking changes in Az minor release except preview version.
  • SHOULD NOT adjust version of module manually in pull request

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented May 25, 2023

🔄Az.RecoveryServices
🔄Breaking Change Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄Signature Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄Help Example Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄Help File Existence Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄File Change Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄UX Metadata Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows

@hiaga hiaga force-pushed the recoveryservices-autorest-migration branch from 95cb91b to 9be5d9d Compare May 25, 2023 06:29
@hiaga hiaga force-pushed the recoveryservices-autorest-migration branch from 146b651 to aca387d Compare June 21, 2023 04:31
@hiaga hiaga added this to the July 2023 (2023-07-04) milestone Jun 21, 2023
@hiaga hiaga marked this pull request as ready for review June 21, 2023 04:47
@hiaga
Copy link
Member Author

hiaga commented Jun 21, 2023

We want to make our module hybrid. Adding autorest based policy cmdlets into generation branch. module - RecoveryServices.Backup.

@vidai-msft vidai-msft added Do Not Merge 🚫 Breaking Change Release This PR contains breaking change labels Jun 21, 2023
@vidai-msft
Copy link
Contributor

@hiaga Please kindly refer to the doc https://eng.ms/docs/cloud-ai-platform/azure-core/azure-management-and-platforms/control-plane-bburns/azure-cli-tools-azure-cli-powershell-and-terraform/azure-cli-tools/teams_docs/azps_docs/migrate_sdk_autorest regarding how to migrate from SDK based cmdlets to Autorest. Since it usually would cause breaking change, it would be rolled out during breaking change release only, which is Ignite 2023 for this year. (Generally twice a year around Build event and Ignite event). Please feel free to let me know if you have any question. Also cc @Alex-wdy

@hiaga
Copy link
Member Author

hiaga commented Jun 21, 2023

@hiaga Please kindly refer to the doc https://eng.ms/docs/cloud-ai-platform/azure-core/azure-management-and-platforms/control-plane-bburns/azure-cli-tools-azure-cli-powershell-and-terraform/azure-cli-tools/teams_docs/azps_docs/migrate_sdk_autorest regarding how to migrate from SDK based cmdlets to Autorest. Since it usually would cause breaking change, it would be rolled out during breaking change release only, which is Ignite 2023 for this year. (Generally twice a year around Build event and Ignite event). Please feel free to let me know if you have any question. Also cc @Alex-wdy

@vidai-msft : We aren't removing any old SDK based commands here. We want to add new commands based on Autorest.

@vidai-msft
Copy link
Contributor

@hiaga Thanks for the update. Can you please follow the link I shared and update the README.md file per that guide to generate Autorest based cmdlets? In addition, please remove the empty test files and fix the issues detected in StaticAnalysis and Test. Thanks!

@hiaga
Copy link
Member Author

hiaga commented Jun 22, 2023

@hiaga Thanks for the update. Can you please follow the link I shared and update the README.md file per that guide to generate Autorest based cmdlets? In addition, please remove the empty test files and fix the issues detected in StaticAnalysis and Test. Thanks!

sure @vidai-msft, in that case can we remove Breaking change release tag

@vidai-msft vidai-msft removed Do Not Merge 🚫 Breaking Change Release This PR contains breaking change labels Jun 22, 2023
@vidai-msft
Copy link
Contributor

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@vidai-msft
Copy link
Contributor

@hiaga The code freeze for this sprint is PST 6PM 6/26. If you want to have the change released on July 4, please make this PR ready before that. Let me know if you have any questions. Thanks!

@hiaga hiaga changed the title Recoveryservices autorest migration [Az.RecoveryServices.Backup] Adding autorest based commands in SDK based RecoveryServices module Jun 23, 2023
@vidai-msft vidai-msft removed this from the July 2023 (2023-07-04) milestone Jun 28, 2023
@hiaga hiaga force-pushed the recoveryservices-autorest-migration branch 2 times, most recently from 630eec4 to c6e1243 Compare June 29, 2023 08:55
@hiaga
Copy link
Member Author

hiaga commented Sep 14, 2023

Have you removed these SDK based Policy commands from main branch? Any breaking changes are expected?

no we haven't removed any commands in the main branch yet. Our current SDK based latest module version is 6.5.0

We have a plan to release autorest based commands in a different preview series something like 8.0.0-preview. Any new features would preferably be released in this autorest series. Any hard fixes (mandatory, security fixes) will be released in SDK based versions for few months until we completely migrate. Our team had detailed discussion with PowerShell team on this, Let me share the email thread with more context.

@BethanyZhou BethanyZhou changed the base branch from generation to generation-RecoveryService-preview September 18, 2023 05:43
@BethanyZhou BethanyZhou changed the base branch from generation-RecoveryService-preview to generation September 18, 2023 05:43
@BethanyZhou
Copy link
Contributor

Please check following errors. If they are false positive, please suppress them by referring https://github.com/Azure/azure-powershell/blob/main/documentation/tooling/static-analysis.md#suppressing-exceptions.
Analyzer invoked with parameters: -p D:\a_work\1\s\artifacts/Debug -r D:\a_work\1\s\artifacts//StaticAnalysisResults --analyzers check-error
D:\a_work\1\s\artifacts//StaticAnalysisResults
D:\a_work\1\s\artifacts//StaticAnalysisResults\SignatureIssues.csv Errors
"Module","ClassName","Target","Severity","ProblemId","Description","Remediation"
"Az.RecoveryServices","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","1","8100","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject Does not support ShouldProcess but the cmdlet verb Edit indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
"Az.RecoveryServices","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","1","8410","Parameter WeeklyRetentionDurationInWeeks of cmdlet Edit-AzRecoveryServicesBackupRetentionPolicyClientObject does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
"Az.RecoveryServices","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","Edit-AzRecoveryServicesBackupRetentionPolicyClientObject","1","8410","Parameter YearlyRetentionDurationInYears of cmdlet Edit-AzRecoveryServicesBackupRetentionPolicyClientObject does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
"Az.RecoveryServices","Edit-AzRecoveryServicesBackupSchedulePolicyClientObject","Edit-AzRecoveryServicesBackupSchedulePolicyClientObject","1","8100","Edit-AzRecoveryServicesBackupSchedulePolicyClientObject Does not support ShouldProcess but the cmdlet verb Edit indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"

D:\a_work\1\s\artifacts//StaticAnalysisResults\ExampleIssues.csv Errors
"Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation"
"Az.RecoveryServices","Get-AzRecoveryServicesBackupPolicy","1","1","Invalid_Parameter_Name","5011","1","Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName is not a valid parameter name.","-ResourceGroupName","Check validity of the parameter -ResourceGroupName."
"Az.RecoveryServices","Get-AzRecoveryServicesBackupPolicy","1","1","Invalid_Parameter_Name","5011","1","Get-AzRecoveryServicesBackupProtectionPolicy -VaultName is not a valid parameter name.","-VaultName","Check validity of the parameter -VaultName."
"Az.RecoveryServices","Get-AzRecoveryServicesBackupPolicy","2","1","Invalid_Parameter_Name","5011","1","Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName is not a valid parameter name.","-ResourceGroupName","Check validity of the parameter -ResourceGroupName."
"Az.RecoveryServices","Get-AzRecoveryServicesBackupPolicy","2","1","Invalid_Parameter_Name","5011","1","Get-AzRecoveryServicesBackupProtectionPolicy -VaultName is not a valid parameter name.","-VaultName","Check validity of the parameter -VaultName."

@github-actions
Copy link

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@hiaga hiaga force-pushed the recoveryservices-autorest-migration branch 2 times, most recently from 9d06e77 to eefe0fd Compare October 26, 2023 08:48
@hiaga hiaga assigned VeryEarly and unassigned BethanyZhou Oct 30, 2023
@hiaga hiaga changed the base branch from generation to generation-RecoveryServices-preview October 30, 2023 08:17
@hiaga hiaga force-pushed the recoveryservices-autorest-migration branch from fa6967a to 5f9d5b0 Compare October 30, 2023 09:02
@VeryEarly VeryEarly merged commit 2cd8f27 into Azure:generation-RecoveryServices-preview Oct 30, 2023
1 of 5 checks passed
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.

7 participants