[Batch] BREAKING CHANGE: Remove deprecated properties#32397
[Batch] BREAKING CHANGE: Remove deprecated properties#32397
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @cRui861, |
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
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.pyfile 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') |
There was a problem hiding this comment.
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])
| 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') |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 32397 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az batch pool create
az batch pool reset
az batch pool set
Description
Removed
--target-communicationand--resource-tagsfromaz batch pool createcommands and removed--target-communicationfromaz batch pool resetandaz batch pool setcommands. Also removedtargetNodeCommunicationMode,currentNodeCommunicationMode, andresourceTagsfrom output. These changes are following our deprecation warning PR #32070Testing Guide
History Notes
[Batch] BREAKING CHANGE:
az batch pool create: Remove deprecated argument--target-communicationand--resource-tags[Batch] BREAKING CHANGE:
az batch pool reset/set: Remove deprecated argument--target-communicationThis 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.