-
Notifications
You must be signed in to change notification settings - Fork 944
[Migration-check] sdk/resourcemanager/trafficmanager/armtrafficmanager/2.0.0 … #25538
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
base: main
Are you sure you want to change the base?
[Migration-check] sdk/resourcemanager/trafficmanager/armtrafficmanager/2.0.0 … #25538
Conversation
…generation from spec commit: 60afd1f611a0c54a957bebb7fc55f06f3c003e38
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this 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
/v2suffix - 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
NextLinkfield - 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) |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
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.
| clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil) | |
| clientFactory, err := armtrafficmanager.NewClientFactory("{subscription-id}", cred, nil) |
| // - 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) { |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
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.
| } | ||
| ctx := context.Background() | ||
| clientFactory, err := armtrafficmanager.NewClientFactory("<subscription-id>", cred, nil) | ||
| clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil) |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
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.
| clientFactory, err := armtrafficmanager.NewClientFactory("<subscriptionID>", cred, nil) | |
| clientFactory, err := armtrafficmanager.NewClientFactory("{subscription-id}", cred, nil) |
breaking change check