Repository navigation
{POSTGRESQL} az postgresql flexible sever migrate update Bug Fix: correct SDK mismatch for update migration command - #34323
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The regression test is in tests/unit, which default latest profile discovery excludes, so normal module test runs will not execute the SDK-keyword regression check.
1 open issue
What changed in this PR
This PR fixes an SDK keyword mismatch in PostgreSQL flexible-server migration cutover updates, allowing the CLI to construct the PATCH model and submit the request.
Changes:
- Replaces the unsupported keyword with
dbs_to_trigger_cutover_on. - Adds a regression test checking the full database cutover payload and unchanged return value.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/postgresql/tests/unit/test_migration_commands.py |
Adds a mocked regression test for cutover request construction. |
src/azure-cli/azure/cli/command_modules/postgresql/commands/migration_commands.py |
Corrects the SDK keyword used in the cutover PATCH model. |
Review effort: Balanced
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Please fix CI issues |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
nasc17 The change at To addressTick each item as you address it.
Review detailsUpstream CIThe router snapshot reports 52/52 upstream checks completed successfully, with no failures. This is upstream CI evidence, not an Agent test run or proof of online cutover service acceptance. Test validation
No linked issue is available; the PR description supplies the scenario: construct the cutover PATCH, submit all databases, and report the service response. The author describes local reproduction and a mocked update, not a successful service cutover.
Copilot feedbackComment Risk assessment16/100 · Low The Low rating is driven by public CLI behavior.
Ask the Agent Tick a box to queue an action. Requires write access to this repository.
|
|
Naga Nandyala (@naga-nandyala) if no blocks can we please have this merged. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Aditya Pujara (@a0x1ab) Teresa Ritorto (@teresaritorto) NoriZC corrected title. Please retrigger checks |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Yong Zhang (@yonzhan) Teresa Ritorto (@teresaritorto) NoriZC can we please merge this PR |
|
Adding mansoor sarfraz (@msarfraz) to help review/merge |

🤖 PR Validation — ️✔️ All clear
Related command
az postgresql flexible sever migrate updateDescription
--migration-name cli62db20261016onlinea --cutover --only-show-errors -o json
Actual: exit 1 at 21:34:54 IST; empty stdout; TypeError: MigrationResourceForPatch.init() got an unexpected keyword argument 'dbs_to_trigger_cutover_migration_on'. The failure occurs during local SDK model construction.
Expected: build the compatible PATCH model, submit the full cutover request, and report the service response. For end-to-end regression verification, use a new healthy small online migration that is ready for cutover; this historical migration has since been canceled. The exact traceback, environment, distinction from the service-state bug, and az rest workaround are in Description.
Discovered:
cutover passes the unsupported keyword dbs_to_trigger_cutover_migration_on . The correct SDK keyword is dbs_to_trigger_cutover_on . I verified it exists in SDK 3.0.0b1 , shipped with CLI 2.85.0.
Local reproduction produced the exact TypeError; client.update was never called. An in-memory keyword correction passed this complete payload to the mocked SDK update and returned its response unchanged:
{"properties":{"triggerCutover":"True","dbsToTriggerCutoverOn":["db1","db2"]}}
Testing Guide
Manual
History Notes
[PostgreSQL]
az postgres flexible-server migration update: Fix online cutover request construction