Describe the bug
The Url-suffix normalization introduced by #11642 correctly includes a last-contract compatibility guard, but that guard does not preserve several shipped Azure management SDK methods and enum values.
A full management regeneration renames existing public Url symbols to Uri, causing ApiCompat failures and source-breaking changes.
Reproduction
Regenerate the Azure SDK for .NET management libraries using:
The previous regeneration used generator packages from 20260812, before #11642 was merged.
Existing methods that are renamed
| Package |
Existing public API |
Regenerated API |
Azure.ResourceManager.Network |
GetVpnProfilePackageUrl / GetVpnProfilePackageUrlAsync |
GetVpnProfilePackageUri / GetVpnProfilePackageUriAsync |
Azure.ResourceManager.AppService |
GetCallbackUrl / GetCallbackUrlAsync |
GetCallbackUri / GetCallbackUriAsync |
Azure.ResourceManager.ContainerRegistry.Tasks |
GetLogSasUrl / GetLogSasUrlAsync |
GetLogSasUri / GetLogSasUriAsync |
Azure.ResourceManager.ContainerRegistry.Tasks |
GetBuildSourceUploadUrl / GetBuildSourceUploadUrlAsync |
GetBuildSourceUploadUri / GetBuildSourceUploadUriAsync |
The Container Registry operation is surfaced both through the mockable resource-group wrapper and public extension methods, producing ten changed public method declarations in total across the affected packages.
Network locally reports CP0002 for the removed GetVpnProfilePackageUrl methods.
Existing enum values that are renamed
| Package/type |
Existing value |
Regenerated value |
Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingKind |
NextPageUrl |
NextPageUri |
Azure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityType |
Url |
Uri |
Likely cause
#11642 checks ClientProvider.LastContractView.Methods before normalizing operation names. Management resource, mockable-resource, and extension methods are synthesized on wrapper providers, so their shipped method names may not exist on the underlying client provider's last-contract view where normalization occurs.
For enum values, the LastContractView field/property lookup also appears not to resolve the final management enum contract in these cases.
The management NameVisitor is not involved in these failures: its Url logic applies only to model type and property names. The affected methods and enum values use the core generator paths added by #11642.
Expected behavior
If the final public management API contains a matching Url-suffixed method or enum value in the assembly identified by ApiCompatVersion, preserve that shipped name. Apply Url → Uri only to genuinely new operations and enum values.
Please add management coverage for synthesized resource/extension methods and management enum values, in addition to the direct client tests added by #11642.
Related management last-contract issue: #11696.
- by copilot
Describe the bug
The Url-suffix normalization introduced by #11642 correctly includes a last-contract compatibility guard, but that guard does not preserve several shipped Azure management SDK methods and enum values.
A full management regeneration renames existing public
Urlsymbols toUri, causing ApiCompat failures and source-breaking changes.Reproduction
Regenerate the Azure SDK for .NET management libraries using:
0f593736b88a60cddba1d53251b53985eb32dbd0@typespec/http-client-csharp:1.0.0-alpha.20260817.7Azure.Generator:1.0.0-alpha.20260817.520260817.2The previous regeneration used generator packages from
20260812, before #11642 was merged.Existing methods that are renamed
Azure.ResourceManager.NetworkGetVpnProfilePackageUrl/GetVpnProfilePackageUrlAsyncGetVpnProfilePackageUri/GetVpnProfilePackageUriAsyncAzure.ResourceManager.AppServiceGetCallbackUrl/GetCallbackUrlAsyncGetCallbackUri/GetCallbackUriAsyncAzure.ResourceManager.ContainerRegistry.TasksGetLogSasUrl/GetLogSasUrlAsyncGetLogSasUri/GetLogSasUriAsyncAzure.ResourceManager.ContainerRegistry.TasksGetBuildSourceUploadUrl/GetBuildSourceUploadUrlAsyncGetBuildSourceUploadUri/GetBuildSourceUploadUriAsyncThe Container Registry operation is surfaced both through the mockable resource-group wrapper and public extension methods, producing ten changed public method declarations in total across the affected packages.
Network locally reports
CP0002for the removedGetVpnProfilePackageUrlmethods.Existing enum values that are renamed
Azure.ResourceManager.SecurityInsights.Models.RestApiPollerRequestPagingKindNextPageUrlNextPageUriAzure.ResourceManager.SecurityInsights.Models.SecurityInsightsEntityTypeUrlUriLikely cause
#11642 checks
ClientProvider.LastContractView.Methodsbefore normalizing operation names. Management resource, mockable-resource, and extension methods are synthesized on wrapper providers, so their shipped method names may not exist on the underlying client provider's last-contract view where normalization occurs.For enum values, the
LastContractViewfield/property lookup also appears not to resolve the final management enum contract in these cases.The management
NameVisitoris not involved in these failures: its Url logic applies only to model type and property names. The affected methods and enum values use the core generator paths added by #11642.Expected behavior
If the final public management API contains a matching
Url-suffixed method or enum value in the assembly identified byApiCompatVersion, preserve that shipped name. ApplyUrl → Urionly to genuinely new operations and enum values.Please add management coverage for synthesized resource/extension methods and management enum values, in addition to the direct client tests added by #11642.
Related management last-contract issue: #11696.
- by copilot