Skip to content

Commit dc861ca

Browse files
authored
Merge branch 'dev' into trisavo/dnl-implementation
2 parents 9d423ba + fa58af5 commit dc861ca

File tree

232 files changed

+34094
-25699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+34094
-25699
lines changed

.azure-pipelines/sync-alias.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ jobs:
7575
git add .github/policies
7676
git commit -m "Sync resourceManagement.yml"
7777
78-
git remote set-url origin https://azclibot:$(GithubToken)@github.com/Azure/azure-cli.git;
79-
git push origin "sync_alias_$env:Build_BuildId" --force
78+
git remote add azclibot https://azclibot:$(GithubToken)@github.com/azclibot/azure-cli.git
79+
git push azclibot "sync_alias_$env:Build_BuildId" --force
8080
displayName: Git commit and push
8181
condition: and(succeeded(), eq(variables['ChangesDetected'], 'true'))
8282
8383
- pwsh: |
8484
$Title = "{CI} Sync resourceManagement.yml according To ADO Wiki Page - Service Contact List"
85-
$HeadBranch = "sync_alias_$env:Build_BuildId"
85+
$HeadBranch = "azclibot:sync_alias_$env:Build_BuildId"
8686
$BaseBranch = "dev"
8787
$Description = "This PR synchronizes the task: 'Triage issues to the service team' part of resourceManagement.yml from table of Service Contact List in ADO wiki page"
8888
@@ -92,5 +92,5 @@ jobs:
9292
9393
Invoke-WebRequest -Uri $Uri -Method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json)
9494
95-
displayName: Create PR to dev branch
95+
displayName: Create PR to azure/azure-cli dev branch
9696
condition: and(succeeded(), eq(variables['ChangesDetected'], 'true'))

doc/how_to_introduce_breaking_changes.md

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,57 @@ You could find the next Breaking Change Release plan in our [milestones](https:/
2929
>
3030
> Please note that providing the required info for assessment does not mean it will be assured to be green-lighted for breaking changes. Team will still make the decision based on the overall impact.
3131
32-
### Pre-announce Breaking Changes
32+
### Ahead-of-1-Month Pre-announcement Policy
3333

34-
All breaking changes **must** be pre-announced two sprints ahead Release. It give users the buffer time ahead to mitigate for better command experience. There are two approaches to inform both interactive users and automatic users about the breaking changes.
34+
All breaking changes **must** be pre-announced **30** days(usually **2** sprints for modules in Core CLI) ahead Release. It gives users the buffer time ahead to mitigate for better command experience. There are two approaches to inform both interactive users and automatic users about the breaking changes.
3535

3636
1. (**Mandatory**) Breaking Changes must be pre-announced through Warning Log while executing.
3737
2. (*Automatic*) Breaking Changes would be collected automatically and listed in [Upcoming Breaking Change](https://learn.microsoft.com/en-us/cli/azure/upcoming-breaking-changes) Document.
3838

39+
### Breaking Changes in Extensions
40+
41+
All breaking changes in GA extensions **must** be pre-announced at least **30** days prior to their Release.
42+
43+
Extensions don't need to follow the breaking change window. However, we still strongly recommend releasing breaking changes only in breaking change windows along with Core Azure CLI.
44+
45+
```text
46+
[GA Release with Breaking Change Pre-Announcement]
47+
48+
├─ Must include complete Breaking Change Information
49+
50+
└─┬─ [Minimum 30-day Announcement Period] ────────────────┐
51+
│ │
52+
│ Allow releases during this period: │
53+
│ - Other unrelated GA versions (vX.(Y+1), v(X+1).Y) │
54+
│ - Multiple preview releases (Beta) │
55+
│ │
56+
▼ ▼
57+
[GA Release Containing Breaking Changes]
58+
(Must fulfill 30-day announcement requirement)
59+
```
60+
3961
## Workflow
4062

41-
### Overview
63+
### CLI Workflow Overview
4264

43-
* CLI Owned Module
44-
* Service Team should create an Issue that requests CLI Team to create the pre-announcement several sprints ahead Breaking Change Window. The issue should include the label `Breaking Change`. The CLI team will look at the issue and evaluate if it will be accepted in the next breaking change release.
65+
* **CLI Owned Module**
66+
* Service Team should create an Issue that requests CLI Team to create the pre-announcement at least **1** month(usually **2** sprints) ahead of Breaking Change Window. The issue should include the label `Breaking Change`. The CLI team will look at the issue and evaluate if it will be accepted in the next breaking change release.
4567
* Please ensure sufficient time for CLI Team to finish the pre-announcement.
46-
* The pre-announcement should be released ahead of Breaking Change Window.
47-
* Service Owned Module
48-
* Service Team should create a Pull Request that create the pre-announcement several sprints ahead Breaking Change Window.
49-
* The pre-announcement should be released ahead of Breaking Change Window.
68+
* The pre-announcement should be released at least **1** month(usually **2** sprints) ahead of Breaking Change Window.
69+
* **Service Owned Module**
70+
* Service Team should create a Pull Request that adds the pre-announcement at least **1** month(usually **2** sprints) ahead of Breaking Change Window.
71+
* The pre-announcement should be released at least **1** month(usually **2** sprints) ahead of Breaking Change Window.
5072
* After releasing the pre-announcement, a pipeline would be triggered, and the Upcoming Breaking Change Documentation would be updated.
5173
* At the start of Breaking Change window, the CLI team would notify Service Teams to adopt Breaking Changes.
5274
* Breaking Changes should be adopted within Breaking Change Window. Any unfinished pre-announcements of breaking changes targeting this release will be deleted by the CLI team.
5375

76+
### Extensions Workflow Overview
77+
78+
* Service Team should create a Pull Request that includes the pre-announcement.
79+
* The pre-announcement should be released after merged.
80+
* After releasing the pre-announcement, a pipeline would be triggered, and the Upcoming Breaking Change Documentation would be updated.
81+
* After 30 days, the Pull Request that contains the actual breaking changes could be merged and released.
82+
5483
### Pre-announce Breaking Changes
5584

5685
The breaking change pre-announcement must be released at least two sprints before the breaking change itself. It is strongly recommended to follow the best practice of providing the new behavior along with the pre-announcement. This allows customers to take action as soon as they discover the pre-announcement.
@@ -72,7 +101,7 @@ You can then pre-announce breaking changes for different command groups or comma
72101
from azure.cli.core.breaking_change import register_required_flag_breaking_change, register_default_value_breaking_change, register_other_breaking_change
73102

74103
register_required_flag_breaking_change('bar foo', '--name')
75-
register_default_value_breaking_change('bar foo baz', '--foobar', 'A', 'B')
104+
register_default_value_breaking_change('bar foo baz', '--foobar', 'A', 'B', target_version='May 2025')
76105
register_other_breaking_change('bar foo baz', 'During May 2024, another Breaking Change would happen in Build Event.')
77106
```
78107

@@ -84,7 +113,7 @@ az bar foo baz
84113

85114
# =====Warning output=====
86115
# The argument '--name' will become required in next breaking change release(2.61.0).
87-
# The default value of '--foobar' will be changed to 'B' from 'A' in next breaking change release(2.61.0).
116+
# The default value of '--foobar' will be changed to 'B' from 'A' in May 2025.
88117
# During May 2024, another Breaking Change would happen in Build Event.
89118
```
90119

@@ -132,6 +161,8 @@ from azure.cli.core.breaking_change import register_argument_deprecate
132161

133162
register_argument_deprecate('bar foo', '--name', target_version='2.70.0')
134163
# Warning Message: Option `--name` has been deprecated and will be removed in 2.70.0.
164+
register_argument_deprecate('bar foo', '--name', target_version='May 2025')
165+
# Warning Message: Option `--name` has been deprecated and will be removed in May 2025.
135166
```
136167

137168
**Rename**
@@ -143,6 +174,8 @@ from azure.cli.core.breaking_change import register_argument_deprecate
143174

144175
register_argument_deprecate('bar foo', '--name', '--new-name')
145176
# Warning Message: Option `--name` has been deprecated and will be removed in next breaking change release(2.67.0). Use `--new-name` instead.
177+
register_argument_deprecate('bar foo', '--name', '--new-name', target_version='May 2025')
178+
# Warning Message: Option `--name` has been deprecated and will be removed in May 2025. Use `--new-name` instead.
146179
```
147180

148181
**Output Change**
@@ -151,7 +184,7 @@ Declare breaking changes that affect the output of a command. This ensures users
151184

152185
* `command`: REQUIRED: The name of the command group or command. If it is a command group, the warning would show in the execution of all commands in the group.
153186
* `description`: REQUIRED: The short-summary description of the breaking change. The description displays in warning messages.
154-
* `target_version`: REQUIRED: The version when the deprecated item should be removed. The `target_version` is the next breaking change window by default.
187+
* `target_version`: REQUIRED: The version when the deprecated item should be removed. The `target_version` is the next breaking change window by default. Use either a specific version number or an approximate date in the format [DDth] MMM YYYY.
155188
* `guide`: REQUIRED: The migration guide that customers can follow to prepare for the future breaking change. Provide as much detail as possible to help our customers transition smoothly.
156189
* `doc_link`: A link to related documentation, which will be displayed in warning messages.
157190

@@ -169,7 +202,7 @@ Declare breaking changes in the logic of the command.
169202

170203
* `command`: REQUIRED: The name of the command.
171204
* `summary`: REQUIRED: The short-summary description of the breaking change. The description displays in warning messages.
172-
* `target_version`: REQUIRED: The version when the breaking change should happen. The `target_version` is the next breaking change window by default.
205+
* `target_version`: REQUIRED: The version when the breaking change should happen. The `target_version` is the next breaking change window by default. Use either a specific version number or an approximate date in the format [DDth] MMM YYYY.
173206
* `detail`: A detailed description of the breaking change, including the actions customers should take. Provide as much detail as possible to help our customers transition smoothly.
174207
* `doc_link`: A link to related documentation, which will be displayed in warning messages.
175208

@@ -188,7 +221,7 @@ Declare breaking changes caused by changes in default values. This ensures users
188221
* `arg`: REQUIRED: The name of the argument or one of its options. The default change warning will display whether the argument is used or not.
189222
* `current_default`: REQUIRED: The current default value of the argument.
190223
* `new_default`: REQUIRED: The new default value of the argument.
191-
* `target_version`: REQUIRED: The version in which the breaking change should happen. By default, this is set to the next breaking change window.
224+
* `target_version`: REQUIRED: The version in which the breaking change should happen. By default, this is set to the next breaking change window. Use either a specific version number or an approximate date in the format [DDth] MMM YYYY.
192225
* `target`: Use this field to overwrite the argument display in warning messages.
193226
* `doc_link`: A link to related documentation, which will be displayed in warning messages.
194227

@@ -197,6 +230,10 @@ from azure.cli.core.breaking_change import register_default_value_breaking_chang
197230

198231
register_default_value_breaking_change('bar foo', '--type', 'TypeA', 'TypeB')
199232
# The default value of `--type` will be changed to `TypeB` from `TypeA` in next breaking change release(2.61.0).
233+
234+
# azure-cli-extensions/src/ext/azext_ext/_breaking_change.py
235+
register_default_value_breaking_change('bar foo', '--type', 'TypeA', 'TypeB', target_version='3.x.x')
236+
# The default value of `--type` will be changed to `TypeB` from `TypeA` in 3.x.x.
200237
```
201238

202239
**Be Required**
@@ -205,7 +242,7 @@ Declare breaking changes that will make an argument required in a future release
205242

206243
* `command`: REQUIRED: The name of the command.
207244
* `arg`: REQUIRED: The name of the argument that will become required.
208-
* `target_version`: REQUIRED: The version in which the argument will become required. By default, this is set to the next breaking change window.
245+
* `target_version`: REQUIRED: The version in which the argument will become required. By default, this is set to the next breaking change window. Use either a specific version number or an approximate date in the format [DDth] MMM YYYY.
209246
* `target`: Use this field to overwrite the argument display in warning messages.
210247
* `doc_link`: A link to related documentation, which will be displayed in warning messages.
211248

@@ -214,6 +251,9 @@ from azure.cli.core.breaking_change import register_required_flag_breaking_chang
214251

215252
register_required_flag_breaking_change('bar foo', '--type')
216253
# The argument `--type` will become required in next breaking change release(2.61.0).
254+
255+
register_required_flag_breaking_change('bar foo', '--type', target_version='May 2024')
256+
# The argument `--type` will become required in May 2024.
217257
```
218258

219259
**Other Changes**
@@ -222,8 +262,8 @@ Declare other custom-breaking changes that do not fall into the predefined categ
222262

223263
* `command`: REQUIRED: The name of the command.
224264
* `message`: REQUIRED: The short-summary description of the breaking change. The description displays in warning messages.
225-
* `arg`: REQUIRED: The name of the argument associated with the breaking change. If arg is not None, the warning message will only be displayed when the argument is used.
226-
* `target_version`: REQUIRED: The version in which the breaking change will occur. By default, this is set to the next breaking change window. This information is published in the [Azure CLI Breaking Changes](https://learn.microsoft.com/en-us/cli/azure/upcoming-breaking-changes) article, but does NOT display in the warning message.
265+
* `arg`: The name of the argument associated with the breaking change. If arg is not None, the warning message will only be displayed when the argument is used.
266+
* `target_version`: REQUIRED: The version in which the breaking change will occur. By default, this is set to the next breaking change window. This information affect the visibility in the [Azure CLI Breaking Changes](https://learn.microsoft.com/en-us/cli/azure/upcoming-breaking-changes) article, but does NOT display in the warning message.
227267

228268
```python
229269
from azure.cli.core.breaking_change import register_other_breaking_change
@@ -239,12 +279,12 @@ To enhance flexibility, the CLI supports using a designated tag to specify a Bre
239279
**Note:** We strongly recommend using this method to display breaking change warnings under specific conditions instead of using `logger.warning` directly. This approach enables centralized documentation of breaking changes and assists in automating customer notifications.
240280

241281
```python
242-
# src/azure-cli/azure/cli/command_modules/vm/custom.py
243-
from azure.cli.core.breaking_change import register_conditional_breaking_change, AzCLIOtherChange
282+
# src/azure-cli/azure/cli/command_modules/vm/_breaking_change.py
283+
from azure.cli.core.breaking_change import AzCLIOtherChange, register_conditional_breaking_change
244284

245-
register_conditional_breaking_change(tag='SpecialBreakingChangeA', breaking_change=(
285+
register_conditional_breaking_change(tag='SpecialBreakingChangeA', breaking_change=AzCLIOtherChange(
246286
'vm create', 'This is special Breaking Change Warning A. This breaking change is happend in "vm create" command.'))
247-
register_conditional_breaking_change(tag='SpecialBreakingChangeB', breaking_change=(
287+
register_conditional_breaking_change(tag='SpecialBreakingChangeB', breaking_change=AzCLIOtherChange(
248288
'vm', 'This is special Breaking Change Warning B. This breaking change is happend in "vm" command group.'))
249289

250290

src/azure-cli-core/azure/cli/core/breaking_change.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# --------------------------------------------------------------------------------------------
55
import abc
66
import argparse
7+
import re
78
from collections import defaultdict
89

910
from knack.log import get_logger
@@ -14,6 +15,7 @@
1415
logger = get_logger()
1516

1617
NEXT_BREAKING_CHANGE_RELEASE = '2.73.0'
18+
NEXT_BREAKING_CHANGE_DATE = 'May 2025'
1719
DEFAULT_BREAKING_CHANGE_TAG = '[Breaking Change]'
1820

1921

@@ -151,9 +153,12 @@ def version(self):
151153
class NextBreakingChangeWindow(TargetVersion):
152154
def __str__(self):
153155
next_breaking_change_version = _next_breaking_change_version()
156+
message = 'in next breaking change release'
154157
if next_breaking_change_version:
155-
return f'in next breaking change release({next_breaking_change_version})'
156-
return 'in next breaking change release'
158+
message += f'({next_breaking_change_version})'
159+
if NEXT_BREAKING_CHANGE_DATE:
160+
message += f' scheduled for {NEXT_BREAKING_CHANGE_DATE}'
161+
return message
157162

158163
def version(self):
159164
return _next_breaking_change_version()
@@ -171,6 +176,18 @@ def version(self):
171176
return self._version
172177

173178

179+
# pylint: disable=too-few-public-methods
180+
class NonVersion(TargetVersion):
181+
def __init__(self, msg):
182+
self._msg = msg
183+
184+
def __str__(self):
185+
return f'in {self._msg}'
186+
187+
def version(self):
188+
return None
189+
190+
174191
# pylint: disable=too-few-public-methods
175192
class UnspecificVersion(TargetVersion):
176193
def __str__(self):
@@ -192,8 +209,10 @@ def __init__(self, cmd, arg=None, target=None, target_version=None):
192209
self.target = target if target else '/'.join(self.args) if self.args else self.cmd
193210
if isinstance(target_version, TargetVersion):
194211
self._target_version = target_version
195-
elif isinstance(target_version, str):
212+
elif isinstance(target_version, str) and re.match(r'\d+.\d+.\d+', target_version):
196213
self._target_version = ExactVersion(target_version)
214+
elif isinstance(target_version, str):
215+
self._target_version = NonVersion(target_version)
197216
else:
198217
self._target_version = UnspecificVersion()
199218

src/azure-cli-core/azure/cli/core/profiles/_shared.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def default_api_version(self):
165165
'snapshots': '2023-10-02',
166166
'galleries': '2021-10-01',
167167
'gallery_images': '2021-10-01',
168-
'gallery_image_versions': '2023-07-03',
168+
'gallery_image_versions': '2024-03-03',
169169
'gallery_applications': '2021-07-01',
170170
'gallery_application_versions': '2022-01-03',
171171
'shared_galleries': '2022-01-03',
@@ -262,7 +262,7 @@ def default_api_version(self):
262262
ResourceType.MGMT_ARO: '2023-11-22',
263263
ResourceType.MGMT_DATABOXEDGE: '2021-02-01-preview',
264264
ResourceType.MGMT_CUSTOMLOCATION: '2021-03-15-preview',
265-
ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2024-10-01'),
265+
ResourceType.MGMT_CONTAINERSERVICE: SDKProfile('2025-01-01'),
266266
ResourceType.MGMT_APPCONTAINERS: '2022-10-01',
267267
},
268268
'2020-09-01-hybrid': {

0 commit comments

Comments
 (0)