Skip to content

[Batch] BREAKING CHANGE: az batch pool create: Remove deprecated argument --resource-tags - #34327

Merged
Naga Nandyala (naga-nandyala) merged 2 commits into
Azure:devfrom
mskeyansong:keyan/batch-finish-resource-tags-removal
Nov 5, 2026
Merged

Naga Nandyala (naga-nandyala) merged 2 commits into
Azure:devfrom
mskeyansong:keyan/batch-finish-resource-tags-removal

Conversation

@mskeyansong

@mskeyansong Keyan Song (mskeyansong) commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests Suppressions
❌ 1 ️✔️ 130/130 ️✔️ None
❌AzureCLI-BreakingChangeTest
❌batch
rule cmd_name rule_message suggest_message
❌ 1007 - ParaRemove batch pool create cmd batch pool create removed parameter resource_tags please add back parameter resource_tags for cmd batch pool create

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

Related command
az batch pool create

Description
--resource-tags was pre-announced for removal in #32070 (2.78.0), and the 2.80.0 release notes list it as removed
(#32397: "az batch pool create: Remove deprecated argument --target-communication and --resource-tags"). But
az batch pool create still accepts it and still shows it in -h, now without a warning. #32397 removed the custom
argument settings and the resourceTags output field, and added target_node_communication_mode to
IGNORE_PARAMETERS in _parameter_format.py, but not resource_tags, so the argument is still built from the SDK
model.

This PR adds resource_tags to IGNORE_PARAMETERS and adds tests. Help for all 128 az batch commands compared with
dev: only az batch pool create -h changed, by losing --resource-tags.

Question for the CLI team: this finishes a removal that was pre-announced and listed in the November 2025 breaking
change release. Can it go into the November 2026 breaking change release, or into a regular release? Or does it need a
new pre-announcement and the next breaking change window?

Testing Guide

  • az batch pool create -h no longer lists --resource-tags.
  • az batch pool create ... --resource-tags key=value fails with "unrecognized arguments: --resource-tags key=value".
  • azdev test batch, azdev style batch, azdev linter batch

History Notes
[Batch] BREAKING CHANGE: az batch pool create: Remove deprecated argument --resource-tags, which 2.80.0 listed as removed but still accepted


Copilot AI balanced review requested due to automatic review settings November 2, 2026 23:05
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Nov 2, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Keyan Song (@mskeyansong)! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The CLI team must decide whether renewed notice is needed and when to remove the argument, which remained usable without warnings after its announced 2025 removal.

No open issues 🎉

What changed in this PR

Completes the previously announced removal of --resource-tags from az batch pool create. This closes the gap left by #32397, which documented the removal but still allowed the argument to be generated from the SDK model.

Changes:

  • Excludes resource_tags from generated Batch CLI arguments.
  • Adds regression coverage for argument exclusion and parser rejection.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​batch/​tests/​latest/​test_batch_data_plane_commands.py Adds a check that passing --resource-tags raises a parser error.
src/​azure-cli/​azure/​cli/​command_modules/​batch/​tests/​latest/​test_batch_commands.py Updates the argument count and asserts that resource_tags is absent.
src/​azure-cli/​azure/​cli/​command_modules/​batch/​_parameter_format.py Adds resource_tags to IGNORE_PARAMETERS.

Review effort: Balanced

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

…he 2.80.0 removal

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mskeyansong
Keyan Song (mskeyansong) force-pushed the keyan/batch-finish-resource-tags-removal branch from 2a81dea to b85c7a7 Compare November 3, 2026 04:47
@mskeyansong

Copy link
Copy Markdown
Contributor Author

Yong Zhang (@yonzhan) the Windows jobs failed because the PR's merge commit was built on an older dev without #34328. I rebased on the latest dev, could you run the pipelines once more?

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@naga-nandyala Naga Nandyala (naga-nandyala) added the Request X Engineering Agent Ask the agent to triage this issue or review this PR label Nov 3, 2026
@x-engineering-agent

x-engineering-agent Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

X Engineering Agent Pull request review: In progress

In progress — X Engineering Agent is reviewing this PR at 68011a7. This comment will be updated with the results.

Keyan Song (@mskeyansong) The argument exclusion matches the stated removal; one regression-assertion gap remains.

Check Status Detail
Upstream CI Passed 52/52 upstream checks completed successfully at this head.
Agent live tests Not run This is a review-only PR.
Regression coverage Unverified For batch: 2 focused test file(s) changed.
Findings 1 medium findings 1 medium
Risk Risk 0/100 Low Low

To address

Tick each item as you address it.

  • Medium Assert the specific removed-argument error

    Details and fix

    Test semantic-strength: src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_data_plane_commands.py:557-561 accepts any SystemExit, without checking its code or diagnostic. The test SDK re-raises these exits (src/azure-cli-testsdk/azure/cli/testsdk/base.py:323-330), and the CLI parser uses exit code 2 for multiple argument errors (src/azure-cli-core/azure/cli/core/parser.py:152-175). Consequently, rejection of a different option or another parsing error would satisfy this assertion without proving rejection of --resource-tags; even SystemExit(0) would satisfy it. Ordinary successful command return is not itself a SystemExit. The updated unit assertion verifies transformed-argument omission, not this command-level error contract.

    Capture the exception and assert code == 2, and capture the parser diagnostic to assert unrecognized arguments: --resource-tags key=value. Verify the focused negative case fails for a zero exit or an unrelated parser error, then rerun the two tests identified above. This is an assertion-strength gap, not evidence of a missing cassette or a production removal defect.

Review details

Upstream CI

52/52 upstream checks completed successfully at this head.

Test validation

  • Agent live test: Not run; this is a review-only PR. Check author-provided test evidence and upstream CI separately.
  • Regression coverage: For batch: 2 focused test file(s) changed. Scenario coverage is unverified; review the issue's required conditions, test setup, and assertions before approval. Changed tests invoke az batch pool create, but invocation alone does not verify the required scenario or output. No linked issue was found in the PR timeline; inspect the source issue and its required scenario manually.

Scope clarification: no linked issue requirement is established; this review assesses the stated --resource-tags removal, without requiring a source issue. CI success does not establish the specific rejection diagnostic. After strengthening the assertion below, rerun test_batch_load_arguments in src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_commands.py and test_batch_pools_and_nodes in src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_data_plane_commands.py in playback against the existing src/azure-cli/azure/cli/command_modules/batch/tests/latest/recordings/test_batch_pools_and_nodes.yaml. The added block fails during argument parsing, before Batch client creation or a service request, so it adds no HTTP interaction requiring a new recording. Scenario/output verification remains outstanding; no tests were run in this review.

Risk assessment

0/100 · Low

The Low rating reflects the detected change scope with no elevated security, reliability, customer, operational, dependency, sovereign-cloud, generated-output, or cross-component signal.

  • Change scope: 3 changed files, 13 changed lines (+11 / -2), including 1 production file.
  • Affected components: batch
  • Risk drivers: No elevated risk signal was detected.
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: No additional owning-squad review signal was detected.

X Engineering Agent · Reviewer · React with +1 or -1 to train the agent

@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Agent reviewed this PR label Nov 3, 2026
…ument

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mskeyansong

Copy link
Copy Markdown
Contributor Author

Thanks, done in 68011a7: the --resource-tags test now checks that the exit code is 2 and that the error is unrecognized arguments: --resource-tags key=value. It fails for a zero exit, an unrelated parser error, or --resource-tags being accepted again, and azdev test batch passes in playback.

Yong Zhang (@yonzhan) could you run the pipelines once more?

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

Adding mansoor sarfraz (@msarfraz) to help review/merge

@naga-nandyala
Naga Nandyala (naga-nandyala) merged commit 40670ff into Azure:dev Nov 5, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad Batch az batch customer-reported Issues that are reported by GitHub users external to the Azure organization. Request X Engineering Agent Ask the agent to triage this issue or review this PR X Engineering Agent Reviewed Agent reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants