Skip to content

[Batch] BREAKING CHANGE: Remove deprecated properties#32397

Merged
yanzhudd merged 4 commits intoAzure:devfrom
cRui861:rechen/remove-commands
Nov 9, 2025
Merged

[Batch] BREAKING CHANGE: Remove deprecated properties#32397
yanzhudd merged 4 commits intoAzure:devfrom
cRui861:rechen/remove-commands

Conversation

@cRui861
Copy link
Copy Markdown
Member

@cRui861 cRui861 commented Nov 7, 2025

Related command
az batch pool create
az batch pool reset
az batch pool set

Description
Removed --target-communication and --resource-tags from az batch pool create commands and removed --target-communication from az batch pool reset and az batch pool set commands. Also removed targetNodeCommunicationMode, currentNodeCommunicationMode, and resourceTags from output. These changes are following our deprecation warning PR #32070

Testing Guide

History Notes
[Batch] BREAKING CHANGE: az batch pool create: Remove deprecated argument --target-communication and --resource-tags
[Batch] BREAKING CHANGE: az batch pool reset/set: Remove deprecated argument --target-communication


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings November 7, 2025 01:15
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Nov 7, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @cRui861,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Nov 7, 2025

❌AzureCLI-BreakingChangeTest
❌batch
rule cmd_name rule_message suggest_message
1007 - ParaRemove batch pool create cmd batch pool create removed parameter target_node_communication_mode please add back parameter target_node_communication_mode for cmd batch pool create
1007 - ParaRemove batch pool reset cmd batch pool reset removed parameter target_node_communication_mode please add back parameter target_node_communication_mode for cmd batch pool reset
1007 - ParaRemove batch pool set cmd batch pool set removed parameter target_node_communication_mode please add back parameter target_node_communication_mode for cmd batch pool set
⚠️ 1004 - CmdPropRemove batch pool list cmd batch pool list removed property deprecate_info_target
⚠️ 1004 - CmdPropRemove batch pool show cmd batch pool show removed property deprecate_info_target

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

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Nov 7, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

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 removes deprecated Azure Batch functionality including node communication modes and resource tags by fully removing the associated arguments, properties, and the breaking change notification file.

Key changes:

  • Removed deprecated command-line arguments (--target-communication, --resource-tags) from pool commands
  • Filtered deprecated output properties (targetNodeCommunicationMode, currentNodeCommunicationMode, resourceTags) from command responses
  • Deleted the _breaking_change.py file as deprecations are now enforced

Reviewed Changes

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

Show a summary per file
File Description
test_batch_mgmt_commands.py Removed test coverage for deprecated --resource-tags argument
test_batch_data_plane_commands.py Added tests to verify deprecated arguments are rejected; removed tests for deprecated functionality
custom.py Removed target_node_communication_mode parameter from replace_pool function
_validators.py Removed unused resource_tag_format validator function
_transformers.py Added filtering logic to exclude deprecated properties from command output
_params.py Removed deprecated argument definitions and unused imports
_breaking_change.py Deleted entire file as breaking changes are now implemented

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

self.kwargs.update({'node1': node_list[0]['id']})

# test that deprecated currentNodeCommunicationMode property is not present in pool output
self.assertNotIn('currentNodeCommunicationMode', node_list, 'currentNodeCommunicationMode should not be present in pool output')
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

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

The assertNotIn check is testing against node_list which is a list of node objects, not a single node dictionary. This will always pass incorrectly because it's checking if a string is in a list of dictionaries. The check should iterate through the nodes or check node_list[0] instead. For example: self.assertNotIn('currentNodeCommunicationMode', node_list[0])

Suggested change
self.assertNotIn('currentNodeCommunicationMode', node_list, 'currentNodeCommunicationMode should not be present in pool output')
self.assertNotIn('currentNodeCommunicationMode', node_list[0], 'currentNodeCommunicationMode should not be present in pool output')

Copilot uses AI. Check for mistakes.
@zhoxing-ms zhoxing-ms changed the title [Batch] Remove deprecated properties [Batch] REAKING CHANGE: Remove deprecated properties Nov 7, 2025
@zhoxing-ms
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@cRui861 cRui861 changed the title [Batch] REAKING CHANGE: Remove deprecated properties [Batch] BREAKING CHANGE: Remove deprecated properties Nov 7, 2025
@cRui861
Copy link
Copy Markdown
Member Author

cRui861 commented Nov 7, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 32397 in repo Azure/azure-cli

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Nov 7, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@yanzhudd yanzhudd merged commit ad0747a into Azure:dev Nov 9, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Batch az batch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants