Skip to content

[PS] Migrate ScheduledQueryRule in Monitor module to autorest v4 #28195

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 8 commits into
base: main
Choose a base branch
from

Conversation

JoyerJin
Copy link
Contributor

@JoyerJin JoyerJin commented Jul 16, 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 ScheduledQueryRule to autorest v4 [PS] Migrate ScheduledQueryRule in Monitor module to autorest v4 Jul 17, 2025
@JoyerJin JoyerJin added the Breaking Change Release This PR contains breaking change label Aug 1, 2025
Copy link

github-actions bot commented Aug 1, 2025

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.

@JoyerJin JoyerJin marked this pull request as ready for review August 1, 2025 06:23
@Copilot Copilot AI review requested due to automatic review settings August 1, 2025 06:23
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 ScheduledQueryRule module in Azure Monitor from AutoRest v3 to v4, representing a significant infrastructure upgrade for the PowerShell cmdlets that manage scheduled query rules in Azure Monitor.

  • Updates test configurations to use fixed resources instead of dynamically created ones
  • Migrates from AutoRest v3 to v4 generation framework
  • Updates type system to use generic collection types instead of strongly typed arrays

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/StaticAnalysis/Exceptions/Az.Monitor/BreakingChangeIssues.csv Documents expected breaking changes for property types and parameter sets
src/Monitor/ScheduledQueryRule.Autorest/test/*.ps1 Updates test setup to use hardcoded resource names and IDs
src/Monitor/ScheduledQueryRule.Autorest/test/env.json Changes environment configuration to use specific test resources
src/Monitor/ScheduledQueryRule.Autorest/docs/*.md Updates parameter types and adds new parameter sets for JSON operations
src/Monitor/ScheduledQueryRule.Autorest/custom/*.ps1 Migrates custom cmdlets to new type system with string-based parameters
src/Monitor/ScheduledQueryRule.Autorest/README.md Simplifies AutoRest configuration and removes v3-specific directives
src/Monitor/Monitor/help/*.md Updates help documentation to reflect new parameter types
src/Monitor/Monitor.sln Adds duplicate project entries to solution file

Comment on lines 74 to 77
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScheduledQueryRule.Autorest", "ScheduledQueryRule.Autorest", "{DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ScheduledQueryRule", "..\..\generated\Monitor\ScheduledQueryRule.Autorest\Az.ScheduledQueryRule.csproj", "{9E22CFC6-9848-4A63-ABED-225A7EE2BC77}"
EndProject
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

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

Duplicate project entries are being added to the solution file. This creates redundant references that could cause build issues.

Suggested change
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScheduledQueryRule.Autorest", "ScheduledQueryRule.Autorest", "{DFE9A16E-4879-AFA3-BD8B-DBC73F42D0CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ScheduledQueryRule", "..\..\generated\Monitor\ScheduledQueryRule.Autorest\Az.ScheduledQueryRule.csproj", "{9E22CFC6-9848-4A63-ABED-225A7EE2BC77}"
EndProject

Copilot uses AI. Check for mistakes.

JoyerJin and others added 2 commits August 4, 2025 11:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant