Network 2025-07-01: regenerate SDK with autorest directives (replaces shim commits)#29709
Open
santoshgh317 wants to merge 2 commits into
Conversation
Apply autorest directives (from xiaogang) to address spec-level issues: - Strip LRO response headers (Location, Retry-After, Azure-AsyncOperation) from 201/202 to prevent header drift - Remove redundant 'tags' on DdosProtectionPlan - Rename Common.CloudError -> CloudError via x-ms-client-name - Move x-ms-azure-resource from CommonProxyResource/CommonTrackedResource and SecurityPerimeter* variants down to CommonResource and Common.SubResource pairs - Use spec commit 587a15661041e26ff8a3059a4886ff9e092adfda with full 16-file input set (including common.json and networkSecurityPerimeter.json) Patch hand-written Customizations/ConnectionMonitorOperation.cs to use the same SafeJsonConvert idiom the generator now emits for the Guid SubscriptionId (fixes 4 CS1503 errors). Result: build succeeds with 0 errors / 0 warnings, replacing the prior shim commits.
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
- Add wildcard x-ms-client-name directive in README.md to strip the 'Common.' prefix from all swagger definitions so generated C# classes keep their legacy names (RouteTable, SubResource, NetworkInterface, etc.), unblocking the handwritten Az.Network layer. - Add directive to delete 'format: uuid' on the subscriptionId parameter so NetworkManagementClient.SubscriptionId regenerates as string (was System.Guid in 2025-07-01). - Update final rename directive: the legacy ManagedServiceIdentityUserAssignedIdentities generated name is now retargeted to ManagedServiceIdentityUserAssignedIdentitiesValue. - Regenerate Network.Management.Sdk via autorest --use:@autorest/powershell@4.x. - Compatibility workaround for TypeSpec/common prefix drift; remove once the source spec drops the 'Common.' prefix.
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the persistent build failures on the
release-network-2025-07-01branch (PR #29635) by regenerating the Az.Network Management SDK with a correctedREADME.mdthat includes autorest directives addressing the underlying spec-level issues. This replaces the prior shim commits (header rename, CommonCloudError stubs) which were treating symptoms rather than the cause.Root cause
The 2025-07-01
Microsoft.Networkspec has structural issues that confuse@autorest/powershellunless they are explicitly worked around via directives:Location,Retry-After,Azure-AsyncOperation) on 201/202 produced header-type drift between operations and customizationstagsonDdosProtectionPlancollided with the inheritedCommon.TrackedResourcepropertyCommon.CloudErrorneeded a clean public name (CloudError)x-ms-azure-resourcehad to be relocated toCommonResource/Common.SubResourceso the inheritance chain resolves correctly (otherwise SubResource constructors lose their arity, producing CS1729)common.jsonandnetworkSecurityPerimeter.jsonfrom the input list and pointed at a non-existent spec path (Microsoft.Network/stable/...instead ofMicrosoft.Network/Network/stable/...)Changes
src/Network/Network.Management.Sdk/README.md— rewritten with the full 16-file input list, spec commit587a15661041e26ff8a3059a4886ff9e092adfda, and the directive block described abovesrc/Network/Network.Management.Sdk/Generated/— full regeneration (1673 files) with@autorest/powershell@4.x(4.0.754) +@autorest/modelerfour4.26.2src/Network/Network.Management.Sdk/Customizations/ConnectionMonitorOperation.cs— patched 4 lines:Client.SubscriptionIdis now aSystem.Guid(notstring), so we use the sameSafeJsonConvertidiom that the generator emitsValidation