[RDBMS] Fix Azure/azure-cli#33776: az postgres flexible-server replica promote: Populate sourceServerResourceId when doing a planned promote#33777
az postgres flexible-server replica promote: Populate sourceServerResourceId when doing a planned promote#33777Conversation
|
Hi @copilot, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
az postgres flexible-server replica promote: Populate sourceServerResourceId when doing a planned promote
Live test results —
|
There was a problem hiding this comment.
Automated CI Review — Failures Detected
This PR's checks did not pass at head commit 43bc36c:
Azure DevOps CI (build 332205):
- ❌
Azure.azure-cli— Build #20260723.19 failed (10 errors). See: https://dev.azure.com/azclitools/5147fa83-336e-44ef-bbe0-c86b8ae86cbb/_build/results?buildId=332205 - ❌
Azure.azure-cli (Test Homebrew Formula)— Test Homebrew Formula failed (1 error). Same build: https://dev.azure.com/azclitools/5147fa83-336e-44ef-bbe0-c86b8ae86cbb/_build/results?buildId=332205
Live test (Azure/issue-sentinel live-test.yml):
Please open the linked Azure DevOps build to see the 10 build errors (likely lint/pylint, unit test failures, or the new test_replica_commands.py unit tests not matching the actual replica_commands.py implementation), fix the root cause, and push an update. Also check the Homebrew formula test output for any related failure. Once fixed, the pipeline will automatically re-run tests and CI on the new commit.
Posted by agent-assist (autonomous bug-fix pipeline).
|
@copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33777 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
…R# to HISTORY.rst
Fixed in commit that addresses three CI issues:
|
Live test results —
|
There was a problem hiding this comment.
CI Review — PR #33777
Tester (live test): ✅ Passed (reused prior successful run for this head SHA).
CI Checks: 88/90 passed, 2 failed (both stem from the same underlying job):
- ❌
Azure.azure-cli (Test Homebrew Formula)— https://github.com/Azure/azure-cli/runs/89316903294 - ❌
Azure.azure-cli— https://github.com/Azure/azure-cli/runs/89338309093 (this is the aggregate/rollup check that reflects the Homebrew Formula job failure above)
Please investigate why the Homebrew Formula test is failing for this change (e.g. formula/version metadata generation, packaging manifest, or a dependency pinning issue introduced by this PR) and push a fix. Once the Homebrew Formula job passes, the aggregate check should pass as well.
Posted by agent-assist (autonomous bug-fix pipeline).
|
@copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33777 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
Investigated the Homebrew Formula test failure. After thorough analysis, this failure is not caused by the code changes in this PR. Root cause of the Homebrew failure: Our PR branch (
The Why the Homebrew test specifically fails: The Evidence my changes don't cause the failure:
The Homebrew Formula CI failure is an infrastructure issue with the macOS CI agent that affects all |
|
RDBMS |
az postgres flexible-server replica promote --promote-mode SwitchOver --promote-option Plannedregressed in 2.88.0: the Postgres Flexible Server RP now requiresproperties.sourceServerResourceIdin the PATCH body, but the CLI was sending only theReplicasub-object (role/promoteMode/promoteOption).Root cause:
flexible_replica_promotealready fetches the server object viaclient.get()to validate the replica role, but never forwardedsource_server_resource_idfrom that object into theServerForPatchupdate body. The field is absent fromServerPropertiesForPatchin the current SDK model, so it must be injected via the model's mapping interface.Fix (
replica_commands.py):New unit tests (
tests/unit/test_replica_commands.py):sourceServerResourceIdin PATCH bodysourceServerResourceIdin PATCH bodyNonesource server ID does not raise and is not injectedTesting Guide
az postgres flexible-server replica promote \ --resource-group $ResourceGroup \ --name $ReadReplicaName \ --promote-mode SwitchOver \ --promote-option PlannedPreviously failed with
(MissingRequiredParameter) Parameter 'properties.sourceServerResourceId' must be specified.; now succeeds.History Notes
[RDBMS]
az postgres flexible-server replica promote: PopulatesourceServerResourceIdin the PATCH body so that planned switchover promote no longer fails withMissingRequiredParameterThis 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.