Skip to content

Conversation

@jliusan
Copy link
Member

@jliusan jliusan commented Oct 31, 2025

breaking change check

…generation from spec commit: 60afd1f611a0c54a957bebb7fc55f06f3c003e38
@jliusan jliusan requested a review from lirenhe as a code owner October 31, 2025 09:29
Copilot AI review requested due to automatic review settings October 31, 2025 09:29
@github-actions github-actions bot added the Mgmt This issue is related to a management-plane library. label Oct 31, 2025
@github-actions
Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

sdk/resourcemanager/trafficmanager/armtrafficmanager

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 upgrades the Azure Traffic Manager SDK from v1 to v2, involving a major regeneration of the client code using Microsoft's Go Code Generator (replacing AutoRest). The changes include:

  • Module path updated to include /v2 suffix
  • Removal of build tags (//go:build go1.18)
  • Updated code generation headers and copyright notices
  • Breaking API changes including new required parameter for HeatMapClient.Get
  • Removal of unused base types (ProxyResource, Resource, TrackedResource)
  • Added pagination support with NextLink field
  • Updated dependency versions

Reviewed Changes

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

Show a summary per file
File Description
go.mod Updated module path to v2 and dependency versions
version.go New file defining module name and version constants
CHANGELOG.md Documents breaking changes and new features for v2.0.0
build.go, autorest.md Removed legacy AutoRest configuration files
constants.go Added new HeatMapType enum, moved module constants to version.go
models.go Removed unused base resource types, updated documentation
*_client.go Updated method signatures, parameter order, documentation
*_example_test.go Updated examples with new import path and patterns
fake/*.go Updated fake server implementations
tsp-location.yaml New TypeSpec configuration file

}
ctx := context.Background()
clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil)
clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil)
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Inconsistent placeholder format for subscription ID. Lines 22, 52, 84, and 114 use <subscriptionID> while most other examples in this file (lines 146, 213, 276, etc.) and other example files use {subscription-id}. For consistency across the SDK, all examples should use the same placeholder format.

Suggested change
clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil)
clientFactory, err := armtrafficmanager.NewClientFactory("{subscription-id}", cred, nil)

Copilot uses AI. Check for mistakes.
// - heatMapType - The type of the heatmap.
// - options - HeatMapClientGetOptions contains the optional parameters for the HeatMapClient.Get method.
func (client *HeatMapClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *HeatMapClientGetOptions) (HeatMapClientGetResponse, error) {
func (client *HeatMapClient) Get(ctx context.Context, resourceGroupName string, profileName string, heatMapType HeatMapType, options *HeatMapClientGetOptions) (HeatMapClientGetResponse, error) {
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

The new heatMapType parameter is a breaking change that's correctly documented in the CHANGELOG. However, according to the constants.go file, there's only one possible value (HeatMapTypeDefault). Consider whether this parameter adds value or if it could be removed/made optional to reduce breaking changes. If it's for future extensibility, this is acceptable, but the API design should be validated.

Copilot uses AI. Check for mistakes.
}
ctx := context.Background()
clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil)
clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil)
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Inconsistent placeholder format. This example uses <subscriptionID> while it should use {subscription-id} to match the pattern used in other regenerated example files like usermetricskeys_client_example_test.go and heatmap_client_example_test.go.

Suggested change
clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil)
clientFactory, err := armtrafficmanager.NewClientFactory("{subscription-id}", cred, nil)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants