Skip to content

Fix load balancing sample - #272

Merged
Simon Kurtz (simonkurtz-MSFT) merged 4 commits into
mainfrom
fix-load-balancing-sample
Aug 27, 2026
Merged

Fix load balancing sample#272
Simon Kurtz (simonkurtz-MSFT) merged 4 commits into
mainfrom
fix-load-balancing-sample

Conversation

@simonkurtz-MSFT

Copy link
Copy Markdown
Member
  • Fix load-balancing policy XML
  • Log debug info error information details

@simonkurtz-MSFT Simon Kurtz (simonkurtz-MSFT) added bug Something isn't working enhancement New feature or request labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🐍 Python 3.14 Results

Metric Status Value
Ruff 0 issue(s)
Unit Tests success
Code Coverage 📊 100%

Full Workflow Logs

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🐍 Python 3.12 Results

Metric Status Value
Ruff 0 issue(s)
Unit Tests success
Code Coverage 📊 100%

Full Workflow Logs

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🐍 Python 3.13 Results

Metric Status Value
Ruff 0 issue(s)
Unit Tests success
Code Coverage 📊 100%

Full Workflow Logs

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Python 3.12 Detailed Test Results

2 084 tests  +1   2 084 ✅ +1   25s ⏱️ +3s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 79b1dad. ± Comparison against base commit e373f13.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Python 3.14 Detailed Test Results

2 084 tests  +1   2 084 ✅ +1   17s ⏱️ -5s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 79b1dad. ± Comparison against base commit e373f13.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Python 3.13 Detailed Test Results

2 084 tests  +1   2 084 ✅ +1   24s ⏱️ +2s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 79b1dad. ± Comparison against base commit e373f13.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

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 the load-balancing sample’s retry-tracking policy XML so it emits valid C# string literals (avoiding invalid multi-character character literals), and improves Azure CLI/ARM failure diagnostics by preferring nested ARM error detail messages while also updating legacy diagnostic-setting cleanup matching.

Changes:

  • Updated the load-balancing retry-tracked policy to use double-quoted C# string literals inside APIM policy expressions, with XML-safe quoting.
  • Adjusted ARM error detail extraction to prefer nested details/innererror messages over top-level messages for better diagnostics.
  • Expanded legacy APIM diagnostic-setting migration matching (including apim-diag) and updated tests accordingly, plus added XML well-formedness validation for rendered policies.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/python/test_load_balancing_helpers.py Adds policy XML parsing validation and asserts retry-tracking policy uses C# string literals.
tests/python/test_azure_resources.py Updates legacy diagnostic-setting migration test cases to include apim-diag and expected delete calls.
tests/python/test_azure_resources_run.py Updates ARM error extraction test payload to ensure nested details are preferred even when a top-level message exists.
shared/python/azure_resources.py Expands legacy diagnostic-setting name matching and changes ARM error extraction ordering to prefer nested details/innererror.
samples/load-balancing/apim-policies/aca-backend-pool-load-balancing-with-retry-tracked.xml Fixes quoting in policy expressions to avoid invalid C# char literals and keep XML attributes well-formed.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@simonkurtz-MSFT
Simon Kurtz (simonkurtz-MSFT) merged commit 1a9359f into main Aug 27, 2026
13 checks passed
@simonkurtz-MSFT
Simon Kurtz (simonkurtz-MSFT) deleted the fix-load-balancing-sample branch August 27, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants