Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ def flexible_server_version_upgrade(cmd, client, resource_group_name, server_nam
list_server_capability_info = get_postgres_server_capability_info(cmd, resource_group_name, server_name)
eligible_versions = list_server_capability_info['supported_server_versions'][str(current_version)]

if version == '13':
logger.warning("PostgreSQL version 13 will reach end-of-life (EOL) soon. "
"Upgrade to PostgreSQL 14 or later as soon as possible to "
"maintain security, performance, and supportability.")

if version not in eligible_versions:
# version not supported
error_message = ""
Expand Down
10 changes: 9 additions & 1 deletion src/azure-cli/azure/cli/command_modules/rdbms/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,18 @@ def _pg_version_validator(version, versions):
if version:
if version not in versions:
raise CLIError('Incorrect value for --version. Allowed values : {}'.format(sorted(versions)))
if version == '11':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit this could be check for 11 and 12 together

raise CLIError("Support for PostgreSQL 11 has officially ended. "
"We recommend selecting PostgreSQL 14 or a later version for "
"all future operations.")
if version == '12':
raise CLIError("Support for PostgreSQL 12 has officially ended. "
"We recommend selecting PostgreSQL 13 or a later version for "
"We recommend selecting PostgreSQL 14 or a later version for "
"all future operations.")
if version == '13':
logger.warning("PostgreSQL version 13 will reach end-of-life (EOL) soon. "
"Upgrade to PostgreSQL 14 or later as soon as possible to "
"maintain security, performance, and supportability.")


def _pg_high_availability_validator(high_availability, standby_availability_zone, zone, tier, single_az, instance):
Expand Down
Loading