Skip to content

[PostgreSQL] Change selection criteria for default SKU when --sku-name not provided - #33897

Open
Nacho Alonso Portillo (nachoalonsoportillo) wants to merge 1 commit into
Azure:devfrom
nachoalonsoportillo:change-selection-criteria-for-default-SKU
Open

[PostgreSQL] Change selection criteria for default SKU when --sku-name not provided#33897
Nacho Alonso Portillo (nachoalonsoportillo) wants to merge 1 commit into
Azure:devfrom
nachoalonsoportillo:change-selection-criteria-for-default-SKU

Conversation

@nachoalonsoportillo

@nachoalonsoportillo Nacho Alonso Portillo (nachoalonsoportillo) commented Aug 14, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az postgres flexible-server create

Description

To make experience consistent with Azure portal.

Testing Guide

History Notes


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

Copilot AI lite review requested due to automatic review settings August 14, 2026 12:43
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 az postgres flexible-server create to pick the default compute SKU based on the capability API’s per-tier default SKU (to align CLI behavior with the Azure portal) when --sku-name isn’t provided.

Changes:

  • Extend parsed location/server capabilities to include default_sku_name per tier.
  • Add a utility helper to retrieve the default SKU for a given tier.
  • Update flexible_server_create to use the default SKU from capabilities instead of sorting available SKUs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/azure-cli/azure/cli/command_modules/postgresql/utils/_flexible_server_util.py Adds get_postgres_default_sku() helper for extracting the tier’s default SKU from capability info.
src/azure-cli/azure/cli/command_modules/postgresql/utils/_flexible_server_location_capabilities_util.py Persists default_sku_name into the tier capability dictionary used throughout the module.
src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Switches default SKU selection in flexible_server_create to use the capability-provided default SKU.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants