You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{Core} Support core bc announcing and Optimize conditional bc usage (#31060)
* Initialize Conditional BC in core
* Support Register BC in core
* Specify the name as login
* Update Conditional BC doc
* Fix indent in doc
* Fix file name issue
* Revert BC announcement in core
* Fix style
* Support Breaking Changes announced in core
* Fix Conditional breaking change style
* Add a custom message to deprecate info in Breaking Change method
Copy file name to clipboardExpand all lines: doc/how_to_introduce_breaking_changes.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -274,26 +274,42 @@ register_other_breaking_change('bar foo', 'During May 2024, another Breaking Cha
274
274
275
275
**Conditional Breaking Change**
276
276
277
-
To enhance flexibility, the CLI supports using a designated tag to specify a Breaking Change Pre-announcement. This method avoids reliance on the default automatic warning display and allows the warning to be shown whenever `print_manual_breaking_change` is called.
277
+
To enhance flexibility, the CLI supports using a designated tag to specify a Breaking Change Pre-announcement. This method avoids reliance on the default automatic warning display and allows the warning to be shown whenever `print_conditional_breaking_change` is called.
278
278
279
279
**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.
280
280
281
+
* Register
282
+
*`tag`: The tag of the conditional breaking change. Use the same tag to print.
283
+
*`breaking_change`: Breaking change item to be announced. This should be an instance of `BreakingChange` subclass or a string. You should provide `command_name` when it is a string.
284
+
*`command_name`: Used only when input str as a breaking change. This would restrict the scope of breaking change tag.
285
+
* Print
286
+
*`cli_ctx`: Context object. Pass this as `None` only when specifying `command_name` manually.
287
+
*`tag` : The tag of the conditional breaking change. Use the same tag to print.
288
+
*`custom_logger`: The logger used to print the warning.
289
+
*`command_name`: Used only when `cli_ctx` is `None`.
# This is special Breaking Change Warning A. This breaking change is happend in "vm create" command.
312
+
# This is special Breaking Change Warning B. This breaking change is happend in "vm" command group.
297
313
```
298
314
299
315
This way, the pre-announcement wouldn't be displayed unless running into the branch, but still could be published in the [Azure CLI Breaking Changes]() article.
0 commit comments