Conversation
️✔️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 adds support for cross-subscription and cross-resource-group restore, geo-restore, and replica creation operations for MySQL flexible servers. This enables users to restore or replicate servers to different subscriptions and resource groups by providing a full resource ID instead of just the server name.
Key Changes
- Added
get_mysql_flexible_management_client_by_subfunction to create MySQL management clients with a specific subscription ID - Updated
flexible_server_restore,flexible_server_georestore, andflexible_replica_createto use the new client factory when working with source servers in different subscriptions - Added help documentation with examples showing how to use resource IDs for cross-subscription/cross-resource-group operations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/mysql/_client_factory.py | Added get_mysql_flexible_management_client_by_sub function to support creating MySQL management clients with a specified subscription ID |
| src/azure-cli/azure/cli/command_modules/mysql/custom.py | Updated restore, geo-restore, and replica create functions to fetch source server using subscription-specific client |
| src/azure-cli/azure/cli/command_modules/mysql/_help.py | Added documentation examples demonstrating cross-subscription and cross-resource-group restore/replica operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Related command
az mysql flexible-server restore
az mysql flexible-server geo-restore
az mysql flexible-server replica create
Description
Support different subscription and resource group in restore, geo-restore and replica creation.
History Notes
[MySQL]
az mysql flexible-server restore: Support restore server to different subscription[MySQL]
az mysql flexible-server geo-restore: Support geo restore server to different subscription[MySQL]
az mysql flexible-server replica create: Support create server replica to different subscriptionThis 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.