Skip to content

[PS] Migrate MonitorWorkspace in Monitor module to autorest v4 #28186

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoyerJin
Copy link
Contributor

@JoyerJin JoyerJin commented Jul 15, 2025

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

Copy link

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

@JoyerJin JoyerJin changed the title [PS] Migrate Monitor/MonitorWorkspace module to autorest v4 [PS] Migrate MonitorWorkspace module to autorest v4 Jul 16, 2025
@JoyerJin JoyerJin changed the title [PS] Migrate MonitorWorkspace module to autorest v4 [PS] Migrate MonitorWorkspace in Monitor module to autorest v4 Jul 17, 2025
@JoyerJin JoyerJin marked this pull request as ready for review July 21, 2025 07:53
@Copilot Copilot AI review requested due to automatic review settings July 21, 2025 07:53
Copy link
Contributor

@Copilot 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 migrates the MonitorWorkspace module in the Monitor package from AutoRest v3 to AutoRest v4, which involves updating the code generation configuration and updating related documentation and breaking change exceptions.

  • Updates AutoRest configuration to use v4 default instead of explicitly using v3 extension
  • Adds new parameter sets for JSON file and string input to workspace cmdlets
  • Updates documentation to reflect the new cmdlet capabilities and output types

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/StaticAnalysis/Exceptions/Az.Monitor/BreakingChangeIssues.csv Documents breaking changes from v3 to v4 migration for property types and parameter sets
src/Monitor/MonitorWorkspace.Autorest/README.md Updates AutoRest configuration to remove v3 extension and modify variant removal directive
src/Monitor/MonitorWorkspace.Autorest/docs/*.md Updates cmdlet documentation with new parameter sets and simplified output types
src/Monitor/Monitor/help/*.md Updates help documentation to match the autorest module changes
src/Monitor/MonitorWorkspace.Autorest/test/env.json Updates test environment configuration with new resource identifiers
src/Monitor/Monitor.sln Updates solution file with new project GUID for the regenerated module

@JoyerJin JoyerJin added the Breaking Change Release This PR contains breaking change label Jul 22, 2025
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.

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.

"Az.Monitor","New-AzMonitorWorkspace","New-AzMonitorWorkspace","0","3000","The type of property 'PrivateEndpointConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource' has changed from 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection' to 'System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection]'.","Change the type of property 'PrivateEndpointConnection' back to 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.IPrivateEndpointConnection'."
"Az.Monitor","New-AzMonitorWorkspace","New-AzMonitorWorkspace","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.ProvisioningState]'."
"Az.Monitor","New-AzMonitorWorkspace","New-AzMonitorWorkspace","0","3000","The type of property 'PublicNetworkAccess' of type 'Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Models.Api20230403.IAzureMonitorWorkspaceResource' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess]' to 'System.String'.","Change the type of property 'PublicNetworkAccess' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Monitor.MonitorWorkspace.Support.PublicNetworkAccess]'."
"Az.Monitor","New-AzMonitorWorkspace","New-AzMonitorWorkspace","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzMonitorWorkspace' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzMonitorWorkspace'."
Copy link
Member

Choose a reason for hiding this comment

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

What does this error mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Location and Tag parameters were used in all parameter set before, now they are not in json parameter sets after migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Release This PR contains breaking change Do Not Merge 🚫
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants