Skip to content

Commit babeb53

Browse files
authored
Update breaking change report template (#492)
* Update breaking change report template. * Fix * Update Version number
1 parent 94d93dc commit babeb53

4 files changed

Lines changed: 37 additions & 12 deletions

File tree

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
0.1.91
6+
++++++
7+
* `azdev generate-breaking-change-report`: Update report report template.
8+
59
0.1.90
610
++++++
711
* `azdev cmdcov`: Fix incorrect detection of code changes as new commands

azdev/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# license information.
55
# -----------------------------------------------------------------------------
66

7-
__VERSION__ = '0.1.90'
7+
__VERSION__ = '0.1.91'

azdev/operations/breaking_change/__init__.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ def __init__(self, module, command, detail, target_version):
2525
self.command = command
2626
self.detail = detail
2727
self.target_version = target_version
28+
self.group_ref = None
29+
30+
def calc_ref(self, loader):
31+
if not loader:
32+
return
33+
if self.command in loader.command_group_table:
34+
self.group_ref = self.command.split()
35+
else:
36+
self.group_ref = self.command.split()[:-1]
2837

2938

3039
def _load_commands():
@@ -247,7 +256,9 @@ def _handle_upcoming_breaking_changes(selected_mod_names, source):
247256
yield from _handle_core(source)
248257

249258
for module, loader in _iter_and_prepare_module_loader(command_loader, selected_mod_names):
250-
yield from _handle_module(module, loader, source)
259+
for bc_item in _handle_module(module, loader, source):
260+
bc_item.calc_ref(loader)
261+
yield bc_item
251262

252263

253264
def _filter_breaking_changes(iterator, max_version=None):
@@ -276,18 +287,19 @@ def _group_breaking_change_items(iterator, group_by_version=False):
276287
if group_by_version:
277288
upcoming_breaking_changes = defaultdict( # module to command
278289
lambda: defaultdict( # command to version
279-
lambda: defaultdict( # version to list of breaking changes
280-
lambda: [])))
290+
lambda: {'group_ref': None, 'items': defaultdict( # version to list of breaking changes
291+
lambda: [])}))
281292
else:
282293
upcoming_breaking_changes = defaultdict( # module to command
283294
lambda: defaultdict( # command to list of breaking changes
284-
lambda: []))
295+
lambda: {'group_ref': None, 'items': []}))
285296
for item in iterator:
286297
version = item.target_version if item.target_version else 'Unspecific'
298+
upcoming_breaking_changes[item.module][item.command]['group_ref'] = item.group_ref
287299
if group_by_version:
288-
upcoming_breaking_changes[item.module][item.command][version].append(item.detail)
300+
upcoming_breaking_changes[item.module][item.command]['items'][version].append(item.detail)
289301
else:
290-
upcoming_breaking_changes[item.module][item.command].append(item.detail)
302+
upcoming_breaking_changes[item.module][item.command]['items'].append(item.detail)
291303
return upcoming_breaking_changes
292304

293305

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Upcoming breaking changes in Azure CLI
22

3+
The breaking changes listed in this article are planned for the next major release of the Azure CLI unless otherwise noted. Per our [Support lifecycle](./azure-cli-support-lifecycle.md), breaking changes in Azure CLI Core reference groups occur twice a year.
4+
35
{% for module, command_bc in module_bc.items() -%}
46
## {{ module }}
57

@@ -8,21 +10,28 @@
810
### `{{ command }}`
911

1012
{% endif -%}
11-
{% if multi_version_bcs is mapping -%}
12-
{% for version, bcs in multi_version_bcs | dictsort -%}
13+
{% if multi_version_bcs.group_ref -%}
14+
[Link to {{ multi_version_bcs.group_ref|join(' ') }} reference group](/cli/azure/{{ multi_version_bcs.group_ref|join('/') }})
15+
16+
{% endif -%}
17+
{% if multi_version_bcs['items'] is mapping -%}
18+
{% for version, bcs in multi_version_bcs['items'] | dictsort -%}
1319
###{%- if not (module == 'core' and command == 'core') -%}#{%- endif %} Deprecated in {{ version }}
1420

1521
{% for bc in bcs -%}
16-
- {{ bc }}
22+
- {{ bc.detail }}
1723
{% endfor %}
1824

1925
{% endfor -%}
2026
{% else -%}
2127

22-
{% for bc in multi_version_bcs -%}
28+
{% for bc in multi_version_bcs['items'] -%}
2329
- {{ bc }}
2430
{% endfor %}
2531

2632
{% endif -%}
2733
{% endfor -%}
28-
{% endfor -%}
34+
{% endfor -%}
35+
36+
> [!NOTE]
37+
> This article provides information on upcoming breaking changes. For previously published breaking changes, see [Azure CLI release notes](./release-notes-azure-cli.md).

0 commit comments

Comments
 (0)