Skip to content

[Network] Fix for issue #51467 #51573

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

Merged
merged 2 commits into from
Aug 1, 2025
Merged

Conversation

HarveyLink
Copy link
Member

This is the fix for issue #51467 .
Fixed the issue in ManagedRuleSetRuleGroup deserialization where rule IDs could be either strings or numbers in JSON, causing InvalidOperationException when parsing mixed-type arrays.

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@github-actions github-actions bot added the Mgmt This issue is related to a management package. label Jul 30, 2025
@HarveyLink HarveyLink marked this pull request as ready for review July 31, 2025 07:02
@Copilot Copilot AI review requested due to automatic review settings July 31, 2025 07:02
Copy link
Contributor

@Copilot 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 fixes a deserialization issue in ManagedRuleSetRuleGroup where rule IDs could be represented as either strings or numbers in JSON, causing parsing failures with mixed-type arrays.

Key Changes

  • Added custom deserialization logic to handle mixed string/number rule ID arrays
  • Added comprehensive test coverage with test data file
  • Updated changelog to document the bug fix

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Customization/Models/ManagedRuleSetRuleGroup.cs Implements custom deserialization hook to convert both string and numeric rule IDs to strings
tests/Tests/UnitTest.cs Adds regression test for mixed rule ID type deserialization
tests/TestData/ManagedRuleSetRuleGroup.json Provides test data with mixed string/numeric rule IDs
tests/Azure.ResourceManager.Network.Tests.csproj Configures test data file to be copied to output directory
CHANGELOG.md Documents the bug fix in the changelog

@ArthurMa1978
Copy link
Member

@microsoft-github-policy-service rerun

@ArthurMa1978
Copy link
Member

/checkenforcer override

@ArthurMa1978
Copy link
Member

/checkenforcer evaluate

@ArthurMa1978 ArthurMa1978 merged commit 4153edd into Azure:main Aug 1, 2025
19 of 20 checks passed
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 package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Azure.ResourceManager.Network.NetworkExtensions.GetWebApplicationFirewallPolicies throws JsonElementWrongTypeException
2 participants