Skip to content

[Az.Compute] The code base is going to be refactored, the following cmdlet adds a BreakingChange announcement #28315

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

Conversation

lijinpei2008
Copy link
Contributor

#28303

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.

@lijinpei2008 lijinpei2008 added the Breaking Change Release This PR contains breaking change label Aug 11, 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.

@lijinpei2008 lijinpei2008 marked this pull request as ready for review August 18, 2025 04:06
@Copilot Copilot AI review requested due to automatic review settings August 18, 2025 04:06
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 adds breaking change announcements for several Azure Compute cmdlets due to an upcoming migration from AutoRest v3 to v4. The changes primarily involve adding breaking change attributes to cmdlets where certain properties will change from single objects to lists.

  • Added breaking change announcements for 6 cmdlets in the changelog
  • Updated help documentation to sanitize SAS URLs in examples
  • Added breaking change attributes to gallery application and run command cmdlets

Reviewed Changes

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

Show a summary per file
File Description
src/Compute/Compute/ChangeLog.md Added breaking change announcement for 6 cmdlets due to AutoRest migration
src/Compute/Compute/help/Set-AzVMRunCommand.md Sanitized SAS URLs in PowerShell examples by replacing with asterisks
src/Compute/Compute/help/Set-AzVmssVMRunCommand.md Sanitized SAS URLs in PowerShell examples by replacing with asterisks
src/Compute/Compute/Az.Compute.psd1 Updated generation date from 7/30/2025 to 2025-07-31
src/Compute/Compute.sln Updated project GUID for Az.Compute AutoRest project
src/Compute/Compute.Autorest/generate-info.json Updated generation ID
src/Compute/Compute.Autorest/docs/Az.Compute.md Updated module GUID
src/Compute/Compute.Autorest/custom/New-AzGalleryApplicationVersion.ps1 Added OutputBreakingChangeAttribute for property type changes
src/Compute/Compute.Autorest/custom/Update-AzGalleryApplicationVersion.ps1 Added OutputBreakingChangeAttribute for property type changes
src/Compute/Compute.Autorest/README.md Added breaking change configuration for three cmdlet groups

* `Update-GalleryApplicationVersion`
* `Invoke-AzSpotPlacementScore`
* `Set-AzVMRunCommand`
* `Set-AzVmssVMRunCommand`
Copy link
Preview

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

[nitpick] The ChangeLog entry should include a brief description of what specific changes users can expect (e.g., 'property types will change from single objects to collections') rather than just listing cmdlet names, to help users understand the impact.

Suggested change
* `Set-AzVmssVMRunCommand`
* Breaking changes to the following cmdlets due to migration from autorest v3 to v4:
- Some property types in the output objects may change (e.g., from single objects to collections), and certain parameter names or types may be updated to align with the new SDK model. Users should review their scripts for compatibility with the updated cmdlet signatures and outputs.
- Affected cmdlets:
* `Get-GalleryApplicationVersion`
* `New-GalleryApplicationVersion`
* `Update-GalleryApplicationVersion`
* `Invoke-AzSpotPlacementScore`
* `Set-AzVMRunCommand`
* `Set-AzVmssVMRunCommand`

Copilot uses AI. Check for mistakes.

@@ -14,6 +14,7 @@ Create or update a gallery Application Version.
#>
function New-AzGalleryApplicationVersion {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion", DeprecatedOutputProperties = ("PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation", "ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus", "TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion", "EncryptionDataDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption"), NewOutputProperties = ("PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]", "ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]", "TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]", "EncryptionDataDiskImage System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption]"))]
Copy link
Preview

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

This extremely long attribute declaration should be broken into multiple lines for better readability and maintainability. Consider using line breaks after each parameter.

Suggested change
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion", DeprecatedOutputProperties = ("PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation", "ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus", "TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion", "EncryptionDataDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption"), NewOutputProperties = ("PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]", "ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]", "TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]", "EncryptionDataDiskImage System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption]"))]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute(
"Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion",
"15.0.0",
"9.0.0",
"2025/11/03",
ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion",
DeprecatedOutputProperties = (
"PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation",
"ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus",
"TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion",
"EncryptionDataDiskImage Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption"
),
NewOutputProperties = (
"PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]",
"ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]",
"TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]",
"EncryptionDataDiskImage System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IDataDiskImageEncryption]"
)
)]

Copilot uses AI. Check for mistakes.

@@ -15,6 +15,7 @@ Update a gallery Application Version.

function Update-AzGalleryApplicationVersion {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion])]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion", DeprecatedOutputProperties = ("PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation", "ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus", "TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion"), NewOutputProperties = ("PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]", "ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]", "TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]"))]
Copy link
Preview

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

This extremely long attribute declaration should be broken into multiple lines for better readability and maintainability. Consider using line breaks after each parameter.

Suggested change
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion", "15.0.0", "9.0.0", "2025/11/03", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion", DeprecatedOutputProperties = ("PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation", "ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus", "TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion"), NewOutputProperties = ("PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]", "ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]", "TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]"))]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.OutputBreakingChangeAttribute(
"Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion",
"15.0.0",
"9.0.0",
"2025/11/03",
ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplicationVersion",
DeprecatedOutputProperties = (
"PublishingProfileTargetExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation",
"ReplicationStatusSummary Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus",
"TargetRegion Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion"
),
NewOutputProperties = (
"PublishingProfileTargetExtendedLocation System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryTargetExtendedLocation]",
"ReplicationStatusSummary System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IRegionalReplicationStatus]",
"TargetRegion System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.ITargetRegion]"
)
)]

Copilot uses AI. Check for mistakes.

@lijinpei2008 lijinpei2008 added Breaking Change Preannounce This PR adds preannouncement about upcoming breaking change and removed Breaking Change Release This PR contains breaking change labels Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Preannounce This PR adds preannouncement about upcoming breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant