Fix az acr network-rule list missing virtualNetworkSubnetResourceId#33663
Fix az acr network-rule list missing virtualNetworkSubnetResourceId#33663Copilot wants to merge 3 commits into
az acr network-rule list missing virtualNetworkSubnetResourceId#33663Conversation
️✔️AzureCLI-FullTest
|
|
Hi @copilot, |
️✔️AzureCLI-BreakingChangeTest
|
The 2021-08-01-preview API returns virtualNetworkRules items with the
field name `virtualNetworkSubnetResourceId`, but the code was reading
`rule.get('id')` which returns None, causing all virtualNetworkRules
to show `virtualNetworkResourceId: null` in the output.
Changes:
- _format_registry_response: read virtualNetworkSubnetResourceId (with
id fallback) and map it to both virtualNetworkResourceId (backward
compat) and virtualNetworkSubnetResourceId in the output
- acr_network_rule_add: use virtualNetworkSubnetResourceId field when
appending new rules to match the API field name
- acr_network_rule_remove: check virtualNetworkSubnetResourceId (with
id fallback) when filtering rules to remove
- Update tests to verify virtualNetworkSubnetResourceId is populated
Closes #33660
az acr network-rule list missing virtualNetworkSubnetResourceId
Live test results —
|
azclibot
left a comment
There was a problem hiding this comment.
CI Failure: Check the Format of Pull Request Title and Content
The Check the Format of Pull Request Title and Content CI gate failed (1 error).
Current title: Fix \az acr network-rule list` missing virtualNetworkSubnetResourceId`
The title is missing the required [ACR] component prefix and the colon after the command. Please update the PR title and description to match the required format below.
PR title & description format (required)
This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.
Title
- Start with
[ACR]— square brackets[]for a customer-facing change (added toHISTORY.rst), curly{}if not. A bug fix is customer-facing, so use[]. - Then
Fix #<issue>:to link the issue (use the short#Nform, notowner/repo#N). - Then the affected command wrapped in backticks followed by a colon — e.g.
`az vm create`:.⚠️ The format check fails if theaz ...command in the title is not inside backticks. - Then a present-tense, capitalized verb (Fix for bug fixes; Add/Change/Deprecate/Remove otherwise) and a concise summary.
- Recommended title (note the backticks around the command):
[ACR] `az acr network-rule list`: Fix <concise description of the fix>
Description — follow the PR template and fill in:
- Related command — the
az ...command this affects. - Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
- Testing Guide — example command(s) showing the fix works.
- History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g.
[ACR] `az <command>`: <note>. - Keep the template checklist and tick the items you've satisfied.
Live-test result: ✅ Passed
Please fix the PR title (and description if needed) to satisfy the format gate.
Posted by agent-assist (autonomous bug-fix pipeline).
|
@copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33663 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
Live test results —
|
azclibot
left a comment
There was a problem hiding this comment.
CI Failure: Check the Format of Pull Request Title and Content
The Check the Format of Pull Request Title and Content CI gate failed.
Current title: Fix \az acr network-rule list` missing virtualNetworkSubnetResourceId`
The title must follow the required format. The current title is missing the [ACR] prefix and the Fix #<issue>: link component.
PR title & description format (required)
This repo enforces a PR format (guide). Please author the PR exactly as follows or CI's Check the Format of Pull Request Title and Content will fail.
Title
- Start with
[ACR]— square brackets[]for a customer-facing change (added toHISTORY.rst), curly{}if not. A bug fix is customer-facing, so use[]. - Then
Fix #<issue>:to link the issue (use the short#Nform, notowner/repo#N). - Then the affected command wrapped in backticks followed by a colon — e.g.
`az vm create`:.⚠️ The format check fails if theaz ...command in the title is not inside backticks. - Then a present-tense, capitalized verb (Fix for bug fixes; Add/Change/Deprecate/Remove otherwise) and a concise summary.
- Recommended title (note the backticks around the command):
[ACR] `az acr network-rule list`: Fix <concise description of the fix>
Description — follow the PR template and fill in:
- Related command — the
az ...command this affects. - Description (mandatory) — why the bug happens, what you changed, and the resulting behavior.
- Testing Guide — example command(s) showing the fix works.
- History Notes — leave the title to drive the history note, or add extra lines in the same format (component in brackets + the command in backticks), e.g.
[ACR] `az <command>`: <note>. - Keep the template checklist and tick the items you've satisfied.
Please update the PR title to match the required format. If there is no linked issue, use the format:
[ACR] `az acr network-rule list`: Fix virtualNetworkRules always showing virtualNetworkResourceId as null
Also ensure the PR description includes all required sections from the PR template (Related command, Description, Testing Guide, History Notes).
Posted by agent-assist (autonomous bug-fix pipeline).
|
@copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33663 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
|
acr |
az acr network-rule listreturnedvirtualNetworkResourceId: nullfor all virtual network rules because_format_registry_responsereadrule.get('id'), but the2021-08-01-previewAPI returns the field asvirtualNetworkSubnetResourceId.Changes (
src/azure-cli/azure/cli/command_modules/acr/network_rule.py):_format_registry_response: ReadvirtualNetworkSubnetResourceId(fallback toidfor backward compat); populate bothvirtualNetworkResourceId(existing, now correctly valued) andvirtualNetworkSubnetResourceId(new) in the outputacr_network_rule_add: UsevirtualNetworkSubnetResourceIdas the field name when appending new rules to match the API contractacr_network_rule_remove: CheckvirtualNetworkSubnetResourceId(fallback toid) when filtering rules to remove — previously rules were never removed due to the field name mismatchBefore / After:
Testing Guide
History Notes
[ACR]
az acr network-rule list: FixvirtualNetworkRulesentries always showingvirtualNetworkResourceId: null; addvirtualNetworkSubnetResourceIdfield to outputThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.