From f9d422c143d2b39f6a8b95382169addede94ccbd Mon Sep 17 00:00:00 2001 From: Chris Stackhouse Date: Mon, 12 May 2025 13:15:34 -0700 Subject: [PATCH 1/4] Add breaking change warnings for upcoming auto-generated commands --- .../resource/_breaking_change.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py diff --git a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py new file mode 100644 index 00000000000..143794123a3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.breaking_change import register_other_breaking_change + +register_other_breaking_change('policy assignment identity remove', 'Removing a user assigned identity will change in a future release of the resource commands. Removing a user assigned identity will require providing the --mi-user-assigned switch.') +register_other_breaking_change('policy assignment identity assign', 'Replacing an existing identity will change in a future release of the resource commands. It will require first removing the existing identity.') +register_other_breaking_change('policy assignment non-compliance-message create', 'The return value will change in a future release of the resource commands. It will be the single created message object rather than the full array of message objects.') +register_other_breaking_change('policy assignment delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change('policy assignment non-compliance-message delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch and nothing will be returned instead of the remaining list of messages.') +register_other_breaking_change('policy definition delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change('policy exemption delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change('policy set-definition delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change('policy exemption create', 'Date format will change slightly in a future release of the resource commands. New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') +register_other_breaking_change('policy exemption update', 'Date format will change slightly in a future release of the resource commands. New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') From 046204a2546fe0eb9b9fd41b7dc01d75dec048ce Mon Sep 17 00:00:00 2001 From: Chris Stackhouse Date: Mon, 12 May 2025 15:35:52 -0700 Subject: [PATCH 2/4] Split long lines --- .../resource/_breaking_change.py | 53 +++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py index 143794123a3..59d9458535a 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py +++ b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py @@ -5,13 +5,46 @@ from azure.cli.core.breaking_change import register_other_breaking_change -register_other_breaking_change('policy assignment identity remove', 'Removing a user assigned identity will change in a future release of the resource commands. Removing a user assigned identity will require providing the --mi-user-assigned switch.') -register_other_breaking_change('policy assignment identity assign', 'Replacing an existing identity will change in a future release of the resource commands. It will require first removing the existing identity.') -register_other_breaking_change('policy assignment non-compliance-message create', 'The return value will change in a future release of the resource commands. It will be the single created message object rather than the full array of message objects.') -register_other_breaking_change('policy assignment delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') -register_other_breaking_change('policy assignment non-compliance-message delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch and nothing will be returned instead of the remaining list of messages.') -register_other_breaking_change('policy definition delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') -register_other_breaking_change('policy exemption delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') -register_other_breaking_change('policy set-definition delete', 'Behavior will change in a future release of the resource commands. Bypassing the confirmation prompt will require providing the -y switch.') -register_other_breaking_change('policy exemption create', 'Date format will change slightly in a future release of the resource commands. New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') -register_other_breaking_change('policy exemption update', 'Date format will change slightly in a future release of the resource commands. New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') +register_other_breaking_change( + 'policy assignment identity remove', + 'Removing a user assigned identity will change in a future release of the resource commands. ' \ + 'It will require providing the --mi-user-assigned switch.') +register_other_breaking_change( + 'policy assignment identity assign', + 'Replacing an existing identity will change in a future release of the resource commands. ' \ + 'It will require first removing the existing identity.') +register_other_breaking_change( + 'policy assignment non-compliance-message create', + 'The return value will change in a future release of the resource commands. ' \ + 'It will be the single created message object rather than the full array of message objects.') +register_other_breaking_change( + 'policy assignment delete', + 'Behavior will change in a future release of the resource commands. ' \ + 'Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change( + 'policy assignment non-compliance-message delete', + 'Behavior will change in a future release of the resource commands. ' \ + 'Bypassing the confirmation prompt will require providing the -y switch and ' \ + 'nothing will be returned instead of the remaining list of messages.') +register_other_breaking_change( + 'policy definition delete', + 'Behavior will change in a future release of the resource commands. ' \ + 'Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change( + 'policy exemption delete', + 'Behavior will change in a future release of the resource commands. ' \ + 'Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change( + 'policy set-definition delete', + 'Behavior will change in a future release of the resource commands. ' \ + 'Bypassing the confirmation prompt will require providing the -y switch.') +register_other_breaking_change( + 'policy exemption create', + 'Date format will change slightly in a future release of the resource commands. ' \ + 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', + '--expires-on') +register_other_breaking_change( + 'policy exemption update', + 'Date format will change slightly in a future release of the resource commands. ' \ + 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', + '--expires-on') From fff56accf5ff78710a411ab23c8df8c6d1dca759 Mon Sep 17 00:00:00 2001 From: Chris Stackhouse Date: Mon, 12 May 2025 16:36:31 -0700 Subject: [PATCH 3/4] Try to make style thing happy... --- .../resource/_breaking_change.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py index 59d9458535a..7a587a8c57f 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py +++ b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py @@ -7,44 +7,44 @@ register_other_breaking_change( 'policy assignment identity remove', - 'Removing a user assigned identity will change in a future release of the resource commands. ' \ - 'It will require providing the --mi-user-assigned switch.') + 'Removing a user assigned identity will change in a future release of the resource commands. ' + 'It will require providing the --mi-user-assigned switch.') register_other_breaking_change( 'policy assignment identity assign', - 'Replacing an existing identity will change in a future release of the resource commands. ' \ - 'It will require first removing the existing identity.') + 'Replacing an existing identity will change in a future release of the resource commands. ' + 'It will require first removing the existing identity.') register_other_breaking_change( 'policy assignment non-compliance-message create', - 'The return value will change in a future release of the resource commands. ' \ - 'It will be the single created message object rather than the full array of message objects.') + 'The return value will change in a future release of the resource commands. ' + 'It will be the single created message object rather than the full array of message objects.') register_other_breaking_change( 'policy assignment delete', - 'Behavior will change in a future release of the resource commands. ' \ - 'Bypassing the confirmation prompt will require providing the -y switch.') + 'Behavior will change in a future release of the resource commands. ' + 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change( 'policy assignment non-compliance-message delete', - 'Behavior will change in a future release of the resource commands. ' \ - 'Bypassing the confirmation prompt will require providing the -y switch and ' \ - 'nothing will be returned instead of the remaining list of messages.') + 'Behavior will change in a future release of the resource commands. ' + 'Bypassing the confirmation prompt will require providing the -y switch and ' + 'nothing will be returned instead of the remaining list of messages.') register_other_breaking_change( 'policy definition delete', - 'Behavior will change in a future release of the resource commands. ' \ - 'Bypassing the confirmation prompt will require providing the -y switch.') + 'Behavior will change in a future release of the resource commands. ' + 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change( 'policy exemption delete', - 'Behavior will change in a future release of the resource commands. ' \ - 'Bypassing the confirmation prompt will require providing the -y switch.') + 'Behavior will change in a future release of the resource commands. ' + 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change( 'policy set-definition delete', - 'Behavior will change in a future release of the resource commands. ' \ - 'Bypassing the confirmation prompt will require providing the -y switch.') + 'Behavior will change in a future release of the resource commands. ' + 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change( 'policy exemption create', - 'Date format will change slightly in a future release of the resource commands. ' \ - 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', + 'Date format will change slightly in a future release of the resource commands. ' + 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') register_other_breaking_change( 'policy exemption update', - 'Date format will change slightly in a future release of the resource commands. ' \ - 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', + 'Date format will change slightly in a future release of the resource commands. ' + 'New format is ISO-8601, e.g. 2025-08-05T00:45:13Z instead of 2025-08-05T00:45:13+00:00.', '--expires-on') From 07cb1d4ea8b70b285aa90bc44bb696ecd875dbd2 Mon Sep 17 00:00:00 2001 From: Chris Stackhouse Date: Fri, 23 May 2025 17:02:36 -0700 Subject: [PATCH 4/4] Remove a couple of messages no longer needed --- .../resource/_breaking_change.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py index 7a587a8c57f..37abcc69af3 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py +++ b/src/azure-cli/azure/cli/command_modules/resource/_breaking_change.py @@ -17,21 +17,16 @@ 'policy assignment non-compliance-message create', 'The return value will change in a future release of the resource commands. ' 'It will be the single created message object rather than the full array of message objects.') -register_other_breaking_change( - 'policy assignment delete', - 'Behavior will change in a future release of the resource commands. ' - 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change( 'policy assignment non-compliance-message delete', - 'Behavior will change in a future release of the resource commands. ' - 'Bypassing the confirmation prompt will require providing the -y switch and ' - 'nothing will be returned instead of the remaining list of messages.') + 'The return value will change in a future release of the resource commands. ' + 'It will be empty rather than the full array of remaining message objects.') register_other_breaking_change( - 'policy definition delete', - 'Behavior will change in a future release of the resource commands. ' - 'Bypassing the confirmation prompt will require providing the -y switch.') + 'policy assignment non-compliance-message create', + 'The return value will change in a future release of the resource commands. ' + 'It will be the single created message object rather than the full array of message objects.') register_other_breaking_change( - 'policy exemption delete', + 'policy definition delete', 'Behavior will change in a future release of the resource commands. ' 'Bypassing the confirmation prompt will require providing the -y switch.') register_other_breaking_change(