{POSTGRESQL} Update Python SDK for PostgreSQL flexible servers to version API to 2026-04-01-preview#33557
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Azure CLI PostgreSQL Flexible Server migration test assets and dependency pins to align with a newer azure-mgmt-postgresqlflexibleservers beta and refreshed live recordings.
Changes:
- Bump
azure-mgmt-postgresqlflexibleserversfrom3.0.0b1to3.0.0b2across setup and OS-specific requirements. - Refresh PostgreSQL migration scenario tests and their recorded HTTP interactions (including updated API versions and resource IDs).
- Remove
migrationVNet.jsonfrom the PostgreSQL test assets.
Reviewed changes
Copilot reviewed 8 out of 41 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/setup.py | Bumps azure-mgmt-postgresqlflexibleservers dependency to 3.0.0b2. |
| src/azure-cli/requirements.py3.windows.txt | Keeps Windows pinned requirements in sync with the updated mgmt dependency version. |
| src/azure-cli/requirements.py3.Linux.txt | Keeps Linux pinned requirements in sync with the updated mgmt dependency version. |
| src/azure-cli/requirements.py3.Darwin.txt | Keeps macOS pinned requirements in sync with the updated mgmt dependency version. |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_migration.py | Updates hardcoded migration IDs and target resource group used by migration scenario tests. |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/recordings/test_postgres_flexible_server_onpremise_migration.yaml | Updates live-mode recordings for on-prem migration flows (API version, RG name, IDs, and payloads). |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/recordings/test_postgres_flexible_server_migration.yaml | Updates live-mode recordings for migration flows (API version, RG name, IDs, and payloads). |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/recordings/test_postgres_flexible_server_create_premiumv2_lrs_version_below_14.yaml | Refreshes recording for PremiumV2 create scenario with newer CLI/core versions and API version. |
| src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/migrationVNet.json | Removes the VNet migration JSON test asset. |
Comments suppressed due to low confidence (3)
src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_migration.py:1
- These tests rely on hardcoded migration names (GUIDs) and a very generic shared resource group name. In live runs, this increases the chance of name collisions and cross-test interference (especially for long-lived migration resources). Consider generating a unique migration name when running live (e.g., based on test name + random suffix) while keeping deterministic names in playback mode, and/or using a more test-specific resource group naming convention.
src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_migration.py:1 - These tests rely on hardcoded migration names (GUIDs) and a very generic shared resource group name. In live runs, this increases the chance of name collisions and cross-test interference (especially for long-lived migration resources). Consider generating a unique migration name when running live (e.g., based on test name + random suffix) while keeping deterministic names in playback mode, and/or using a more test-specific resource group naming convention.
src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_migration.py:1 - These tests rely on hardcoded migration names (GUIDs) and a very generic shared resource group name. In live runs, this increases the chance of name collisions and cross-test interference (especially for long-lived migration resources). Consider generating a unique migration name when running live (e.g., based on test name + random suffix) while keeping deterministic names in playback mode, and/or using a more test-specific resource group naming convention.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| body: '{"location": "eastus2euap", "properties": {"dbsToMigrate": ["postgres"], | ||
| "overwriteDbsInTarget": "True", "sourceType": "OnPremises", "sslMode": "Prefer", | ||
| "sourceDbServerResourceId": "20.66.25.58:5432@postgres", "setupLogicalReplicationOnSourceDbIfNeeded": | ||
| "False", "secretParameters": {"adminCredentials": {"sourceServerPassword": "XXXXXXXXX", | ||
| "targetServerPassword": "XXXXXXXXX"}, "targetServerUsername": "portaltestuser"}, | ||
| "migrationOption": "Validate", "migrationMode": "offline"}}' |
| string: '{"sku":{"name":"Standard_B1ms","tier":"Burstable"},"systemData":{"createdAt":"2026-06-15T20:16:25.1004083Z"},"properties":{"dataEncryption":{"type":"SystemManaged"},"replica":{"role":"Primary","capacity":5},"storage":{"type":"","iops":120,"tier":"P4","storageSizeGB":32,"autoGrow":"Disabled"},"network":{"publicNetworkAccess":"Disabled"},"privateEndpointConnections":[],"authConfig":{"activeDirectoryAuth":"Disabled","passwordAuth":"Enabled"},"fullyQualifiedDomainName":"autobot-e2e-pg-fs-canadacentral.postgres.database.azure.com","version":"16","minorVersion":"14","administratorLogin":"pgadmin","state":"Ready","availabilityZone":"3","backup":{"backupRetentionDays":7,"geoRedundantBackup":"Disabled","earliestRestoreDate":"2026-06-15T20:29:00.2055827+00:00"},"highAvailability":{"mode":"Disabled","state":"NotEnabled"},"maintenanceWindow":{"customWindow":"Enabled","dayOfWeek":2,"startHour":12,"startMinute":0},"replicationRole":"Primary","replicaCapacity":5},"location":"Canada | ||
| Central","tags":{"do-not-delete":"true","purpose":"e2e-tests","created-by":"copilot-cli"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/autobot-resourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/autobot-e2e-pg-fs-canadacentral","name":"autobot-e2e-pg-fs-canadacentral","type":"Microsoft.DBforPostgreSQL/flexibleServers"}' |
|
@calvinhzy please trigger checks |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@Pan-Qi @calvinhzy @yonzhan can we please merge |
|
Hi @Pan-Qi @calvinhzy @yonzhan can we please merge |
|
🔔 Routing this PR to @act-codegen-extensibility-squad. |
|
@daniel-ms @isra-fel @necusjz @notyashhh @xuming-ms Could you please merge the PR on behalf of the code owner? Thanks |
Related command
Update CLI to use latest Python SDK version 2.0.0 using new package import from https://pypi.org/project/azure-mgmt-postgresqlflexibleservers/3.0.0b2/
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.