Skip to content

Conversation

@lijinpei2008
Copy link
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update 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.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

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

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@github-actions
Copy link

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

@lijinpei2008
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@lijinpei2008
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@lijinpei2008 lijinpei2008 added Contains Breaking Change This PR contains breaking change and removed Do Not Merge 🚫 labels Aug 18, 2025
@github-actions
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

@lijinpei2008 lijinpei2008 marked this pull request as ready for review August 22, 2025 10:33
Copilot AI review requested due to automatic review settings August 22, 2025 10:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Az.Advisor module to use AutoRest PowerShell v4 instead of v3, which involves regenerating the module with the newer generation tool. The update primarily affects type signatures and parameter types while maintaining the same functionality.

Key changes:

  • Updates AutoRest PowerShell generation tool from v3 to v4
  • Changes parameter types from strongly-typed enums to strings (e.g., CpuThreshold to String)
  • Updates output type signatures to use simplified namespaces
  • Adds breaking change exceptions for backward compatibility

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/StaticAnalysis/Exceptions/Az.Advisor/BreakingChangeIssues.csv Adds breaking change exceptions for type changes from v3 to v4 generation
src/Advisor/Advisor/help/*.md Updates help documentation to reflect new parameter and output types
src/Advisor/Advisor/Az.Advisor.psd1 Updates module generation date and Az.Accounts dependency version
src/Advisor/Advisor.sln Updates project GUID references for regenerated components
src/Advisor/Advisor.Autorest/generate-info.json Updates generation ID for new AutoRest run
src/Advisor/Advisor.Autorest/docs/*.md Updates AutoRest documentation with new type signatures
src/Advisor/Advisor.Autorest/custom/*.ps1 Removes breaking change attributes and updates parameter types
src/Advisor/Advisor.Autorest/README.md Removes v3-specific configuration and simplifies directive patterns
src/Advisor/Advisor.Autorest/Properties/AssemblyInfo.cs Removes trailing whitespace

# Generated by: Microsoft Corporation
#
# Generated on: 2025-07-27
# Generated on: 2025-06-27
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

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

The generation date has moved backward from 2025-07-27 to 2025-06-27, which suggests an incorrect timestamp. Generation dates should typically move forward when modules are regenerated.

Suggested change
# Generated on: 2025-06-27
# Generated on: 2025-07-28

Copilot uses AI. Check for mistakes.
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?Expanded)
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

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

The regex pattern ^(Create|Update)(?!.*?Expanded) uses a negative lookahead that may not work as intended. Consider using ^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$ for clearer intent and better maintainability.

Suggested change
variant: ^(Create|Update)(?!.*?Expanded)
variant: ^Create$|^Update$

Copilot uses AI. Check for mistakes.
Enable recommendation by resource Id

### Example 2: Enable recommendation by recommendation name
### Example 2: Enable recommendation byrecommendation name

Choose a reason for hiding this comment

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

by recommendation (let's not remove this space in between)

```

Enable recommendation by recommendation name
Enable recommendation byrecommendation name

Choose a reason for hiding this comment

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

by recommendation (let's not remove this space in between)

@isra-fel isra-fel added the autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 label Oct 2, 2025
@Pan-Qi Pan-Qi requested a review from isra-fel October 27, 2025 06:54
@isra-fel isra-fel self-assigned this Oct 30, 2025
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

LGTM

@isra-fel isra-fel merged commit c2921c6 into main Nov 10, 2025
12 checks passed
@isra-fel isra-fel deleted the jinpei/main/Advisor-update-v4 branch November 10, 2025 05:14
@dolauli dolauli self-assigned this Nov 10, 2025
@dolauli dolauli added the Breaking change PR reviewed Add this label after a PR with breaking change has been reviewed and approved. label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 Breaking change PR reviewed Add this label after a PR with breaking change has been reviewed and approved. Contains Breaking Change This PR contains breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants