[MySQL] Fix #32217: az mysql flexible-server restore: Fix --no-wait flag#32744
[MySQL] Fix #32217: az mysql flexible-server restore: Fix --no-wait flag#32744
az mysql flexible-server restore: Fix --no-wait flag#32744Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR aims to fix the --no-wait flag for the az mysql flexible-server restore command (and also updates az mysql flexible-server geo-restore). Previously, the --no-wait flag was not honored due to the control flow of the restore/georestore functions. The changes restructure the code to properly support asynchronous operations using callbacks when --no-wait is specified.
Changes:
- Added test coverage for restore with
--no-waitflag - Refactored
flexible_server_restoreto support--no-waitusing callbacks - Attempted to apply the same fix to
flexible_server_georestore(but with critical bugs)
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py | Adds new test test_mysql_flexible_server_restore_no_wait_mgmt to validate --no-wait flag behavior |
| src/azure-cli/azure/cli/command_modules/mysql/custom.py | Refactors flexible_server_restore and flexible_server_georestore to properly handle --no-wait flag with callbacks, but georestore implementation has critical bugs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az mysql flexible-server restore: Fix --no-wait flagaz mysql flexible-server restore: Fix --no-wait flag
az mysql flexible-server restore: Fix --no-wait flagaz mysql flexible-server restore: Fix --no-wait flag
az mysql flexible-server restore: Fix --no-wait flagaz mysql flexible-server restore: Fix --no-wait flag
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az mysql flexible-server restoreDescription
--no-waitflag was not honoured correctly due to the flow of the function process--no-waitflagTesting Guide
az mysql flexible-server restore -g {} --name {} --source-server {} --no-waitHistory Notes
[MySQL] Fix #32217:
az mysql flexible-server restore: Fix--no-waitflagThis 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.