[POSGRESQL] BREAKING CHANGE: az postgres flexible-server create/update: Remove --high-availability for preferred argument --zonal-resiliency#33415
Conversation
…te`: Remove `--high-availability` for preferred argument `--zonal-resiliency`
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Hi @nachoalonsoportillo, |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR updates the az postgres flexible-server create and az postgres flexible-server update command surface to remove the --high-availability argument and standardize on --zonal-resiliency, aligning the CLI with naming used across other PostgreSQL tooling.
Changes:
- Removed
--high-availabilityparameter wiring and updated create/update implementations to derive SDK high availability settings from--zonal-resiliency. - Updated validation logic to validate zonal resiliency settings (and related flags like
--allow-same-zone/--standby-zone) without the deprecated argument. - Updated scenario tests to use
--zonal-resiliencyinstead of--high-availability.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/postgresql/utils/validators.py | Removes --high-availability validation and introduces _pg_zonal_resiliency_validator usage. |
| src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py | Removes high_availability CLI parameter plumbing; maps --zonal-resiliency to SDK HighAvailability(mode=...). |
| src/azure-cli/azure/cli/command_modules/postgresql/_params.py | Removes the --high-availability argument definition and keeps --zonal-resiliency as the primary switch. |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands.py | Updates negative validator tests to use --zonal-resiliency. |
Comments suppressed due to low confidence (2)
src/azure-cli/azure/cli/command_modules/postgresql/utils/validators.py:358
- The validation error message still refers to "High availability" even though the CLI surface has been renamed to --zonal-resiliency. This can confuse users who no longer see a --high-availability flag; consider updating the wording to reference "zonal resiliency" (and optionally mention it enables high availability).
if zonal_resiliency_enabled:
if tier.lower() == 'burstable':
raise ArgumentUsageError('High availability is not supported for the Burstable tier.')
if single_az and allow_same_zone is False:
src/azure-cli/azure/cli/command_modules/postgresql/_params.py:258
- The --zonal-resiliency argument help currently says "Enable or disable high availability feature." Given the breaking rename, this should describe "zonal resiliency" (and optionally clarify it controls high availability) to align with the new parameter name and docs.
zonal_resiliency_arg_type = CLIArgumentType(
arg_type=get_enum_type(['Enabled', 'Disabled']),
options_list=['--zonal-resiliency'],
help='Enable or disable high availability feature.'
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| standby_availability_zone_arg_type = CLIArgumentType( | ||
| options_list=['--standby-zone'], | ||
| help="The availability zone information of the standby server when high availability is enabled." | ||
| ) |
Related command
az postgres flexible-server createaz postgres flexible-server updateDescription
We are switching out high availability argument name for zonal resiliency in alignment with documentation across other PostgreSQL tools.
Testing Guide
Manual
History Notes
[POSGRESQL] BREAKING CHANGE:
az postgres flexible-server create/update: Remove--high-availabilityfor preferred argument--zonal-resiliencyThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.