Skip to content

[POSGRESQL] BREAKING CHANGE: az postgres flexible-server create/update: Remove --high-availability for preferred argument --zonal-resiliency#33415

Closed
nachoalonsoportillo wants to merge 2 commits into
Azure:devfrom
nachoalonsoportillo:obo-naia
Closed

[POSGRESQL] BREAKING CHANGE: az postgres flexible-server create/update: Remove --high-availability for preferred argument --zonal-resiliency#33415
nachoalonsoportillo wants to merge 2 commits into
Azure:devfrom
nachoalonsoportillo:obo-naia

Conversation

@nachoalonsoportillo
Copy link
Copy Markdown
Member

@nachoalonsoportillo nachoalonsoportillo commented May 21, 2026

Related command
az postgres flexible-server create
az postgres flexible-server update

Description
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-availability for preferred argument --zonal-resiliency


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings May 21, 2026 07:50
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @nachoalonsoportillo,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 21, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-availability parameter 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-resiliency instead 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.

Comment on lines 249 to 252
standby_availability_zone_arg_type = CLIArgumentType(
options_list=['--standby-zone'],
help="The availability zone information of the standby server when high availability is enabled."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants