azdev 0.1.53__tar.gz → 0.1.55__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azdev-0.1.53 → azdev-0.1.55}/HISTORY.rst +8 -0
- {azdev-0.1.53/azdev.egg-info → azdev-0.1.55}/PKG-INFO +9 -1
- {azdev-0.1.53 → azdev-0.1.55}/azdev/__init__.py +1 -1
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/command_change/custom.py +28 -2
- azdev-0.1.55/azdev/operations/command_change/data/meta_change_whitelist.txt +9 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/command_change/meta_changes.py +43 -11
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/command_change/util.py +18 -1
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/__init__.py +8 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/const.py +7 -2
- {azdev-0.1.53 → azdev-0.1.55/azdev.egg-info}/PKG-INFO +9 -1
- {azdev-0.1.53 → azdev-0.1.55}/azdev.egg-info/SOURCES.txt +1 -0
- {azdev-0.1.53 → azdev-0.1.55}/setup.py +1 -0
- {azdev-0.1.53 → azdev-0.1.55}/LICENSE +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/MANIFEST.in +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/README.md +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/README.rst +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/__main__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/commands.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/completer.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/config/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/help.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/cmdcov.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/component.js +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/cmdcov/tested_command.txt +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/command_change/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/constant.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/extensions/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/extensions/util.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/legal.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/performance.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/regex.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/resource.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/setup.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/statistics/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/style.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/testtool/profile_context.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/operations/testtool/pytest_runner.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/params.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/transformers.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/command.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/config.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/display.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/path.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev.egg-info/requires.txt +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/pyproject.toml +0 -0
- {azdev-0.1.53 → azdev-0.1.55}/setup.cfg +0 -0
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.55
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev command-change meta-diff`: Fix data/meta_change_whitelist.txt pkg building
|
|
8
|
+
|
|
9
|
+
0.1.54
|
|
10
|
+
++++++
|
|
11
|
+
* `azdev command-change meta-export/meta-diff`: Add cmd `type` extraction, fix false positive in cmdPropUpdate and add whitelist in certain meta-changes (#401)
|
|
12
|
+
|
|
5
13
|
0.1.53
|
|
6
14
|
++++++
|
|
7
15
|
* `azdev command-change meta-export`: Add rule link (#402)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.55
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -125,6 +125,14 @@ License
|
|
|
125
125
|
|
|
126
126
|
Release History
|
|
127
127
|
===============
|
|
128
|
+
0.1.55
|
|
129
|
+
++++++
|
|
130
|
+
* `azdev command-change meta-diff`: Fix data/meta_change_whitelist.txt pkg building
|
|
131
|
+
|
|
132
|
+
0.1.54
|
|
133
|
+
++++++
|
|
134
|
+
* `azdev command-change meta-export/meta-diff`: Add cmd `type` extraction, fix false positive in cmdPropUpdate and add whitelist in certain meta-changes (#401)
|
|
135
|
+
|
|
128
136
|
0.1.53
|
|
129
137
|
++++++
|
|
130
138
|
* `azdev command-change meta-export`: Add rule link (#402)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
|
4
4
|
# license information.
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
|
-
|
|
6
|
+
import os.path
|
|
7
7
|
from enum import Enum
|
|
8
8
|
from knack.log import get_logger
|
|
9
9
|
from azdev.utilities import (CMD_PROPERTY_ADD_BREAK_LIST, CMD_PROPERTY_REMOVE_BREAK_LIST,
|
|
@@ -42,6 +42,18 @@ class MetaChangeDetects:
|
|
|
42
42
|
self.diff_meta = diff_meta
|
|
43
43
|
self.diff_objs = []
|
|
44
44
|
self.cmd_set_with_parameter_change = set()
|
|
45
|
+
self.meta_change_whitelist = set()
|
|
46
|
+
self.__get_meta_change_whitelist__()
|
|
47
|
+
|
|
48
|
+
def __get_meta_change_whitelist__(self):
|
|
49
|
+
white_list_file = os.path.dirname(os.path.realpath(__file__)) + "/data/meta_change_whitelist.txt"
|
|
50
|
+
if not os.path.exists(white_list_file):
|
|
51
|
+
logger.info("meta_change_whitelist.txt not exist, skipped")
|
|
52
|
+
return
|
|
53
|
+
with open(white_list_file, "r") as f_in:
|
|
54
|
+
for line in f_in:
|
|
55
|
+
white_key = line.rstrip()
|
|
56
|
+
self.meta_change_whitelist.add(white_key)
|
|
45
57
|
|
|
46
58
|
@staticmethod
|
|
47
59
|
def __search_cmd_obj(cmd_name, search_meta):
|
|
@@ -88,7 +100,7 @@ class MetaChangeDetects:
|
|
|
88
100
|
if cmd_property in CMD_PROPERTY_ADD_BREAK_LIST:
|
|
89
101
|
diff_obj = CmdPropAdd(cmd_name, cmd_property, True)
|
|
90
102
|
else:
|
|
91
|
-
diff_obj = CmdPropAdd(cmd_name, cmd_property,
|
|
103
|
+
diff_obj = CmdPropAdd(cmd_name, cmd_property, False)
|
|
92
104
|
self.diff_objs.append(diff_obj)
|
|
93
105
|
else:
|
|
94
106
|
if cmd_property in CMD_PROPERTY_REMOVE_BREAK_LIST:
|
|
@@ -257,6 +269,17 @@ class MetaChangeDetects:
|
|
|
257
269
|
cmp_parameters = cmd_cmp.get("parameters", [])
|
|
258
270
|
self.check_cmd_parameter_diff(cmd_name, base_parameters, cmp_parameters)
|
|
259
271
|
|
|
272
|
+
def filter_diffs_by_whitelist(self):
|
|
273
|
+
"""
|
|
274
|
+
filter_diffs_by_whitelist
|
|
275
|
+
"""
|
|
276
|
+
new_diff_objs = []
|
|
277
|
+
for obj in self.diff_objs:
|
|
278
|
+
if obj.filter_key and obj.is_break and "\t".join(obj.filter_key) in self.meta_change_whitelist:
|
|
279
|
+
continue
|
|
280
|
+
new_diff_objs.append(obj)
|
|
281
|
+
self.diff_objs = new_diff_objs
|
|
282
|
+
|
|
260
283
|
def check_deep_diffs(self):
|
|
261
284
|
self.check_dict_item_remove()
|
|
262
285
|
self.check_dict_item_add()
|
|
@@ -264,6 +287,7 @@ class MetaChangeDetects:
|
|
|
264
287
|
self.check_list_item_add()
|
|
265
288
|
self.check_value_change()
|
|
266
289
|
self.check_cmds_parameter_diff()
|
|
290
|
+
self.filter_diffs_by_whitelist()
|
|
267
291
|
|
|
268
292
|
@staticmethod
|
|
269
293
|
def fill_subgroup_rules(obj, ret_mod, rule):
|
|
@@ -325,6 +349,8 @@ class MetaChangeDetects:
|
|
|
325
349
|
for obj in self.diff_objs:
|
|
326
350
|
if only_break and not obj.is_break:
|
|
327
351
|
continue
|
|
352
|
+
if obj.is_ignore:
|
|
353
|
+
continue
|
|
328
354
|
ret = {}
|
|
329
355
|
for prop in self.EXPORTED_META_PROPERTY:
|
|
330
356
|
if hasattr(obj, prop):
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
1010 ams asset get-sas-urls expiry_time default
|
|
2
|
+
1010 mysql flexible-server create administrator_login default
|
|
3
|
+
1010 mysql flexible-server restore restore_point_in_time default
|
|
4
|
+
1010 mysql flexible-server import create administrator_login default
|
|
5
|
+
1010 postgres flexible-server create administrator_login default
|
|
6
|
+
1010 postgres flexible-server restore restore_point_in_time default
|
|
7
|
+
1010 mysql server create administrator_login default
|
|
8
|
+
1010 postgres server create administrator_login default
|
|
9
|
+
1010 mariadb server create administrator_login default
|
|
@@ -4,18 +4,24 @@
|
|
|
4
4
|
# license information.
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# pylint: disable=too-many-instance-attributes
|
|
8
|
+
|
|
9
|
+
from azdev.utilities import get_change_rule_template, get_change_suggest_template
|
|
10
|
+
from azdev.utilities import CMD_PROPERTY_IGNORED_LIST, PARA_PROPERTY_IGNORED_LIST, PARA_NAME_IGNORED_LIST, \
|
|
11
|
+
PARA_VALUE_IGNORED_LIST, BREAKING_CHANE_RULE_LINK_URL_PREFIX, BREAKING_CHANE_RULE_LINK_URL_SUFFIX
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
class MetaChange:
|
|
12
15
|
|
|
13
|
-
def __init__(self, rule_id="1000", is_break=False, rule_message="", suggest_message=""
|
|
16
|
+
def __init__(self, rule_id="1000", is_break=False, rule_message="", suggest_message="",
|
|
17
|
+
is_ignore=False, filter_key=None):
|
|
14
18
|
self.rule_id = rule_id
|
|
15
19
|
self.rule_link_url = BREAKING_CHANE_RULE_LINK_URL_PREFIX + self.rule_id + BREAKING_CHANE_RULE_LINK_URL_SUFFIX
|
|
16
20
|
self.is_break = is_break
|
|
17
21
|
self.rule_message = rule_message
|
|
18
22
|
self.suggest_message = suggest_message
|
|
23
|
+
self.is_ignore = is_ignore
|
|
24
|
+
self.filter_key = filter_key
|
|
19
25
|
|
|
20
26
|
def __str__(self):
|
|
21
27
|
res = [self.rule_message]
|
|
@@ -80,13 +86,18 @@ class CmdPropAdd(MetaChange):
|
|
|
80
86
|
if not cmd_name or not cmd_property:
|
|
81
87
|
raise Exception("cmd name needed")
|
|
82
88
|
self.rule_id = "1003"
|
|
89
|
+
self.is_ignore = False
|
|
83
90
|
self.cmd_name = cmd_name
|
|
84
91
|
self.cmd_property = cmd_property
|
|
85
92
|
self.is_break = is_break
|
|
86
93
|
self.rule_message = get_change_rule_template(self.rule_id).format(self.cmd_name, self.cmd_property)
|
|
87
94
|
self.suggest_message = get_change_suggest_template(self.rule_id).format(self.cmd_property, self.cmd_name) \
|
|
88
95
|
if self.is_break else ""
|
|
89
|
-
|
|
96
|
+
if cmd_property in CMD_PROPERTY_IGNORED_LIST:
|
|
97
|
+
self.is_ignore = True
|
|
98
|
+
self.filter_key = [self.rule_id, self.cmd_name, self.cmd_property]
|
|
99
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message, self.is_ignore,
|
|
100
|
+
self.filter_key)
|
|
90
101
|
|
|
91
102
|
|
|
92
103
|
class CmdPropRemove(MetaChange):
|
|
@@ -94,22 +105,27 @@ class CmdPropRemove(MetaChange):
|
|
|
94
105
|
if not cmd_name or not cmd_property:
|
|
95
106
|
raise Exception("cmd name needed")
|
|
96
107
|
self.rule_id = "1004"
|
|
108
|
+
self.is_ignore = False
|
|
97
109
|
self.cmd_name = cmd_name
|
|
98
110
|
self.cmd_property = cmd_property
|
|
99
111
|
self.is_break = is_break
|
|
100
112
|
self.rule_message = get_change_rule_template(self.rule_id).format(self.cmd_name, self.cmd_property)
|
|
101
113
|
self.suggest_message = get_change_suggest_template(self.rule_id).format(self.cmd_property, self.cmd_name) \
|
|
102
114
|
if self.is_break else ""
|
|
103
|
-
|
|
115
|
+
if cmd_property in CMD_PROPERTY_IGNORED_LIST:
|
|
116
|
+
self.is_ignore = True
|
|
117
|
+
self.filter_key = [self.rule_id, self.cmd_name, self.cmd_property]
|
|
118
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message,
|
|
119
|
+
self.is_ignore, self.filter_key)
|
|
104
120
|
|
|
105
121
|
|
|
106
122
|
class CmdPropUpdate(MetaChange):
|
|
107
123
|
|
|
108
|
-
# pylint: disable=too-many-instance-attributes
|
|
109
124
|
def __init__(self, cmd_name, cmd_property, is_break=False, old_value=None, new_value=None):
|
|
110
125
|
if not cmd_name or not cmd_property:
|
|
111
126
|
raise Exception("cmd name and cmd prop needed")
|
|
112
127
|
self.rule_id = "1005"
|
|
128
|
+
self.is_ignore = False
|
|
113
129
|
self.cmd_name = cmd_name
|
|
114
130
|
self.is_break = is_break
|
|
115
131
|
self.cmd_prop_updated = cmd_property
|
|
@@ -125,7 +141,11 @@ class CmdPropUpdate(MetaChange):
|
|
|
125
141
|
self.suggest_message = get_change_suggest_template(self.rule_id).format(self.cmd_prop_updated,
|
|
126
142
|
self.new_value, self.old_value,
|
|
127
143
|
self.cmd_name) if self.is_break else ""
|
|
128
|
-
|
|
144
|
+
if cmd_property in CMD_PROPERTY_IGNORED_LIST:
|
|
145
|
+
self.is_ignore = True
|
|
146
|
+
self.filter_key = [self.rule_id, self.cmd_name, self.cmd_prop_updated]
|
|
147
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message,
|
|
148
|
+
self.is_ignore, self.filter_key)
|
|
129
149
|
|
|
130
150
|
|
|
131
151
|
class ParaAdd(MetaChange):
|
|
@@ -164,6 +184,7 @@ class ParaPropAdd(MetaChange):
|
|
|
164
184
|
if not cmd_name or not para_name or not para_property:
|
|
165
185
|
raise Exception("cmd name, parameter name and parameter property needed")
|
|
166
186
|
self.rule_id = "1008"
|
|
187
|
+
self.is_ignore = False
|
|
167
188
|
self.cmd_name = cmd_name
|
|
168
189
|
self.para_name = para_name
|
|
169
190
|
self.para_prop = para_property
|
|
@@ -174,7 +195,9 @@ class ParaPropAdd(MetaChange):
|
|
|
174
195
|
self.suggest_message = get_change_suggest_template(self.rule_id).format(self.para_prop,
|
|
175
196
|
self.para_name,
|
|
176
197
|
self.cmd_name) if self.is_break else ""
|
|
177
|
-
|
|
198
|
+
if para_property in PARA_PROPERTY_IGNORED_LIST or para_name in PARA_NAME_IGNORED_LIST:
|
|
199
|
+
self.is_ignore = True
|
|
200
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message, self.is_ignore)
|
|
178
201
|
|
|
179
202
|
|
|
180
203
|
class ParaPropRemove(MetaChange):
|
|
@@ -183,6 +206,7 @@ class ParaPropRemove(MetaChange):
|
|
|
183
206
|
if not cmd_name or not para_name or not para_property:
|
|
184
207
|
raise Exception("cmd name, parameter name and parameter property needed")
|
|
185
208
|
self.rule_id = "1009"
|
|
209
|
+
self.is_ignore = False
|
|
186
210
|
self.cmd_name = cmd_name
|
|
187
211
|
self.para_name = para_name
|
|
188
212
|
self.para_prop = para_property
|
|
@@ -193,16 +217,18 @@ class ParaPropRemove(MetaChange):
|
|
|
193
217
|
self.suggest_message = get_change_suggest_template(self.rule_id).format(self.para_prop,
|
|
194
218
|
self.para_name,
|
|
195
219
|
self.cmd_name) if self.is_break else ""
|
|
196
|
-
|
|
220
|
+
if para_property in PARA_PROPERTY_IGNORED_LIST or para_name in PARA_NAME_IGNORED_LIST:
|
|
221
|
+
self.is_ignore = True
|
|
222
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message, self.is_ignore)
|
|
197
223
|
|
|
198
224
|
|
|
199
225
|
class ParaPropUpdate(MetaChange):
|
|
200
226
|
|
|
201
|
-
# pylint: disable=too-many-instance-attributes
|
|
202
227
|
def __init__(self, cmd_name, para_name, para_property, is_break=False, old_value=None, new_value=None):
|
|
203
228
|
if not cmd_name or not para_name or not para_property:
|
|
204
229
|
raise Exception("cmd name, parameter name and parameter property needed")
|
|
205
230
|
self.rule_id = "1010"
|
|
231
|
+
self.is_ignore = False
|
|
206
232
|
self.cmd_name = cmd_name
|
|
207
233
|
self.para_name = para_name
|
|
208
234
|
self.para_prop_updated = para_property
|
|
@@ -221,4 +247,10 @@ class ParaPropUpdate(MetaChange):
|
|
|
221
247
|
self.new_value, self.old_value,
|
|
222
248
|
self.para_name,
|
|
223
249
|
self.cmd_name) if self.is_break else ""
|
|
224
|
-
|
|
250
|
+
if para_property in PARA_PROPERTY_IGNORED_LIST or para_name in PARA_NAME_IGNORED_LIST:
|
|
251
|
+
self.is_ignore = True
|
|
252
|
+
if self.new_value in PARA_VALUE_IGNORED_LIST or self.old_value in PARA_VALUE_IGNORED_LIST:
|
|
253
|
+
self.is_ignore = True
|
|
254
|
+
self.filter_key = [self.rule_id, self.cmd_name, self.para_name, self.para_prop_updated]
|
|
255
|
+
super().__init__(self.rule_id, is_break, self.rule_message, self.suggest_message,
|
|
256
|
+
self.is_ignore, self.filter_key)
|
|
@@ -68,7 +68,8 @@ def process_aaz_argument(az_arguments_schema, argument_settings, para):
|
|
|
68
68
|
aaz_type = _fields.get(argument_settings["dest"], None)
|
|
69
69
|
if aaz_type:
|
|
70
70
|
para["aaz_type"] = aaz_type.__class__.__name__
|
|
71
|
-
|
|
71
|
+
if aaz_type._type_in_help and aaz_type._type_in_help.lower() != "undefined": # pylint: disable=protected-access
|
|
72
|
+
para["type"] = aaz_type._type_in_help # pylint: disable=protected-access
|
|
72
73
|
if has_value(aaz_type._default): # pylint: disable=protected-access
|
|
73
74
|
para["aaz_default"] = aaz_type._default # pylint: disable=protected-access
|
|
74
75
|
if para["aaz_type"] in ["AAZArgEnum"] and aaz_type.get("enum", None) and aaz_type.enum.get("items", None):
|
|
@@ -95,6 +96,21 @@ def process_arg_options(argument_settings, para):
|
|
|
95
96
|
para["options"] = sorted(option_list)
|
|
96
97
|
|
|
97
98
|
|
|
99
|
+
def process_arg_type(argument_settings, para):
|
|
100
|
+
if not argument_settings.get("type", None):
|
|
101
|
+
return
|
|
102
|
+
configured_type = argument_settings["type"]
|
|
103
|
+
raw_type = None
|
|
104
|
+
if hasattr(configured_type, "__name__"):
|
|
105
|
+
raw_type = configured_type.__name__
|
|
106
|
+
elif hasattr(configured_type, "__class__"):
|
|
107
|
+
raw_type = configured_type.__class__.__name__
|
|
108
|
+
else:
|
|
109
|
+
print("unsupported type", configured_type)
|
|
110
|
+
return
|
|
111
|
+
para["type"] = raw_type if raw_type in ["str", "int", "float", "bool", "file_type"] else "custom_type"
|
|
112
|
+
|
|
113
|
+
|
|
98
114
|
def gen_command_meta(command_info, with_help=False, with_example=False):
|
|
99
115
|
stored_property_when_exist = ["confirmation", "supports_no_wait", "is_preview"]
|
|
100
116
|
command_meta = {
|
|
@@ -128,6 +144,7 @@ def gen_command_meta(command_info, with_help=False, with_example=False):
|
|
|
128
144
|
"name": settings["dest"],
|
|
129
145
|
}
|
|
130
146
|
process_arg_options(settings, para)
|
|
147
|
+
process_arg_type(settings, para)
|
|
131
148
|
if settings.get("required", False):
|
|
132
149
|
para["required"] = True
|
|
133
150
|
if settings.get("choices", None):
|
|
@@ -25,9 +25,13 @@ from .const import (
|
|
|
25
25
|
CMD_PROPERTY_ADD_BREAK_LIST,
|
|
26
26
|
CMD_PROPERTY_REMOVE_BREAK_LIST,
|
|
27
27
|
CMD_PROPERTY_UPDATE_BREAK_LIST,
|
|
28
|
+
CMD_PROPERTY_IGNORED_LIST,
|
|
28
29
|
PARA_PROPERTY_ADD_BREAK_LIST,
|
|
29
30
|
PARA_PROPERTY_REMOVE_BREAK_LIST,
|
|
30
31
|
PARA_PROPERTY_UPDATE_BREAK_LIST,
|
|
32
|
+
PARA_NAME_IGNORED_LIST,
|
|
33
|
+
PARA_PROPERTY_IGNORED_LIST,
|
|
34
|
+
PARA_VALUE_IGNORED_LIST,
|
|
31
35
|
COMMAND_MODULE_PREFIX,
|
|
32
36
|
EXTENSION_PREFIX,
|
|
33
37
|
IS_WINDOWS,
|
|
@@ -74,9 +78,13 @@ __all__ = [
|
|
|
74
78
|
'CMD_PROPERTY_ADD_BREAK_LIST',
|
|
75
79
|
'CMD_PROPERTY_REMOVE_BREAK_LIST',
|
|
76
80
|
'CMD_PROPERTY_UPDATE_BREAK_LIST',
|
|
81
|
+
'CMD_PROPERTY_IGNORED_LIST',
|
|
77
82
|
'PARA_PROPERTY_ADD_BREAK_LIST',
|
|
78
83
|
'PARA_PROPERTY_REMOVE_BREAK_LIST',
|
|
79
84
|
'PARA_PROPERTY_UPDATE_BREAK_LIST',
|
|
85
|
+
'PARA_NAME_IGNORED_LIST',
|
|
86
|
+
'PARA_PROPERTY_IGNORED_LIST',
|
|
87
|
+
'PARA_VALUE_IGNORED_LIST',
|
|
80
88
|
'display',
|
|
81
89
|
'output',
|
|
82
90
|
'heading',
|
|
@@ -21,10 +21,15 @@ BREAKING_CHANE_RULE_LINK_URL_SUFFIX = ".md"
|
|
|
21
21
|
CMD_PROPERTY_REMOVE_BREAK_LIST = []
|
|
22
22
|
CMD_PROPERTY_ADD_BREAK_LIST = ["confirmation"]
|
|
23
23
|
CMD_PROPERTY_UPDATE_BREAK_LIST = []
|
|
24
|
+
CMD_PROPERTY_IGNORED_LIST = ["is_aaz", "supports_no_wait"]
|
|
24
25
|
|
|
25
26
|
PARA_PROPERTY_REMOVE_BREAK_LIST = ["options", "id_part", "nargs"]
|
|
26
|
-
PARA_PROPERTY_ADD_BREAK_LIST = ["required", "choices", "
|
|
27
|
-
PARA_PROPERTY_UPDATE_BREAK_LIST = ["default", "aaz_default"]
|
|
27
|
+
PARA_PROPERTY_ADD_BREAK_LIST = ["required", "choices", "type"]
|
|
28
|
+
PARA_PROPERTY_UPDATE_BREAK_LIST = ["default", "aaz_default", "type"]
|
|
29
|
+
PARA_NAME_IGNORED_LIST = ["force_string"]
|
|
30
|
+
PARA_PROPERTY_IGNORED_LIST = []
|
|
31
|
+
PARA_VALUE_IGNORED_LIST = ["generic_update_set", "generic_update_add", "generic_update_remove",
|
|
32
|
+
"generic_update_force_string"]
|
|
28
33
|
|
|
29
34
|
CHANGE_RULE_MESSAGE_MAPPING = {
|
|
30
35
|
"1000": "default Message",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.55
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -125,6 +125,14 @@ License
|
|
|
125
125
|
|
|
126
126
|
Release History
|
|
127
127
|
===============
|
|
128
|
+
0.1.55
|
|
129
|
+
++++++
|
|
130
|
+
* `azdev command-change meta-diff`: Fix data/meta_change_whitelist.txt pkg building
|
|
131
|
+
|
|
132
|
+
0.1.54
|
|
133
|
+
++++++
|
|
134
|
+
* `azdev command-change meta-export/meta-diff`: Add cmd `type` extraction, fix false positive in cmdPropUpdate and add whitelist in certain meta-changes (#401)
|
|
135
|
+
|
|
128
136
|
0.1.53
|
|
129
137
|
++++++
|
|
130
138
|
* `azdev command-change meta-export`: Add rule link (#402)
|
|
@@ -64,6 +64,7 @@ azdev/operations/command_change/__init__.py
|
|
|
64
64
|
azdev/operations/command_change/custom.py
|
|
65
65
|
azdev/operations/command_change/meta_changes.py
|
|
66
66
|
azdev/operations/command_change/util.py
|
|
67
|
+
azdev/operations/command_change/data/meta_change_whitelist.txt
|
|
67
68
|
azdev/operations/extensions/__init__.py
|
|
68
69
|
azdev/operations/extensions/util.py
|
|
69
70
|
azdev/operations/help/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|