-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Use MRW for ManagedServiceIdentity serialization #50705
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
Conversation
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 updates the serialization logic for ManagedServiceIdentity to support the new MRW approach and the V3 format while also updating various test assets and related test code. Key changes include:
- Updates to test asset JSON files (removing duplicate or extra closing brackets and fields).
- Modifications in test helper methods and ManagedServiceIdentity serialization/deserialization logic to support V3 formatting.
- Adjustments in test utilities and removal of obsolete tests.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/resourcemanager/Azure.ResourceManager/tests/Unit/TestAssets/Identity/*.json | Removed extra or duplicate fields to correctly represent identity JSON structures |
| sdk/resourcemanager/Azure.ResourceManager/tests/Unit/ManagedServiceIdentityTest.cs | Updated deserialization helper to support MRW and included string normalization changes |
| sdk/resourcemanager/Azure.ResourceManager/tests/Unit/JsonAsserts.cs | Adjusted AssertConverterSerialization to work with IJsonModel and ModelReaderWriterOptions |
| sdk/resourcemanager/Azure.ResourceManager/tests/Scenario/PolicyAssignmentCollectionTests.cs | Removed obsolete ManagedIdentity test cases |
| sdk/resourcemanager/Azure.ResourceManager/src/Common/Custom/Models/ManagedServiceIdentity.Serialization.cs | Enhanced V3 handling and improved null handling for user assigned identities |
| sdk/resourcemanager/Azure.ResourceManager/src/Common/Custom/Models/AzureResourceManagerContext.cs | Added builder registration for ManagedServiceIdentity |
This PR is to release a beta package of Azure.ResourceManager to apply with the code change from generator in Azure/autorest.csharp#5347