Skip to content

Commit 7ff92c9

Browse files
author
Rena Chen
committed
Add breaking change deprecation warnings
1 parent e67cbb0 commit 7ff92c9

3 files changed

Lines changed: 40 additions & 2 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
6+
from azure.cli.core.breaking_change import register_argument_deprecate, register_output_breaking_change
7+
8+
# Arguments
9+
register_argument_deprecate(
10+
"az batch pool create",
11+
argument="--target-communication"
12+
)
13+
14+
# fixed with action=None but check with CLI team
15+
register_argument_deprecate(
16+
"az batch pool create",
17+
argument="--resource-tags"
18+
)
19+
20+
register_argument_deprecate(
21+
"az batch pool reset",
22+
argument="--target-communication"
23+
)
24+
register_argument_deprecate(
25+
"az batch pool set",
26+
argument="--target-communication"
27+
)
28+
29+
# Outputs
30+
register_output_breaking_change(
31+
"batch pool show",
32+
description="Reduce output field `targetNodeCommunicationMode`, `currentNodeCommunicationMode`, and `resourceTags`"
33+
)
34+
35+
register_output_breaking_change(
36+
"batch pool list",
37+
description="Reduce output field `targetNodeCommunicationMode`, `currentNodeCommunicationMode`, and `resourceTags`"
38+
)

src/azure-cli/azure/cli/command_modules/batch/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def load_arguments(self, _):
382382

383383
with self.argument_context('batch pool create') as c:
384384
c.argument('json_file', help='The file containing pool create properties parameter specification in JSON(formatted to match REST API request body). If this parameter is specified, all \'Pool Create Properties Parameter Arguments\' are ignored. See https://learn.microsoft.com/rest/api/batchservice/pool/add?tabs=HTTP#request-body')
385-
c.argument('resource_tags', arg_group='Pool', type=resource_tag_format, help="User is able to specify resource tags for the pool. Any resource created for the pool will then also be tagged by the same resource tags")
385+
c.argument('resource_tags', action=None, arg_group='Pool', type=resource_tag_format, help="User is able to specify resource tags for the pool. Any resource created for the pool will then also be tagged by the same resource tags")
386386
c.argument('target_node_communication_mode', options_list=['--target-communication'],
387387
help="The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged.",
388388
arg_type=get_enum_type(BatchNodeCommunicationMode))

src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_transformers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestBatchTransformers(unittest.TestCase):
1313

1414
def test_transform_object_empty_list(self):
1515
fake_transformer = Transformer({"testing": "potato"})
16-
result = fake_transformer.transform_result([])
16+
result = fake_transformer.transform_result([]) 
1717
self.assertEqual(result, [])
1818

1919
def test_transform_object(self):

0 commit comments

Comments
 (0)