From b652cf75abc9c5c6b6273b5a00a8442dec0d060e Mon Sep 17 00:00:00 2001 From: Naia Scott Date: Tue, 17 Dec 2024 18:48:16 -0500 Subject: [PATCH 1/2] Add warning that selecting version 12 for mvu will be deprecated --- .../command_modules/rdbms/flexible_server_custom_common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py index 9b8dc6f8331..a1a93159c41 100644 --- a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py +++ b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py @@ -296,6 +296,11 @@ def flexible_server_version_upgrade(cmd, client, resource_group_name, server_nam current_version = int(instance.version.split('.')[0]) if current_version >= int(version): raise CLIError("The version to upgrade to must be greater than the current version.") + if version == '12': + logger.warning("Support for PostgreSQL 12 has officially ended. As a result, " + "the option to select version 12 will be removed in the near future. " + "We recommend selecting PostgreSQL 13 or a later version for " + "all future operations.") replica_operations_client = cf_postgres_flexible_replica(cmd.cli_ctx, '_') version_mapped = version From b79734bd471d015ecc00654db9f2def9b6edad64 Mon Sep 17 00:00:00 2001 From: Naia Scott Date: Thu, 19 Dec 2024 20:46:49 -0500 Subject: [PATCH 2/2] Fix indent --- .../command_modules/rdbms/flexible_server_custom_common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py index a1a93159c41..333ad9657a6 100644 --- a/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py +++ b/src/azure-cli/azure/cli/command_modules/rdbms/flexible_server_custom_common.py @@ -298,9 +298,9 @@ def flexible_server_version_upgrade(cmd, client, resource_group_name, server_nam raise CLIError("The version to upgrade to must be greater than the current version.") if version == '12': logger.warning("Support for PostgreSQL 12 has officially ended. As a result, " - "the option to select version 12 will be removed in the near future. " - "We recommend selecting PostgreSQL 13 or a later version for " - "all future operations.") + "the option to select version 12 will be removed in the near future. " + "We recommend selecting PostgreSQL 13 or a later version for " + "all future operations.") replica_operations_client = cf_postgres_flexible_replica(cmd.cli_ctx, '_') version_mapped = version