-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{MySQL} az mysql flexible-server backup delete: Support deletion of on-demand backup
#32498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️AzureCLI-FullTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| mysql flexible-server backup delete | cmd mysql flexible-server backup delete added |
||
| mysql flexible-server backup show | cmd mysql flexible-server backup show update parameter backup_name: removed property id_part=child_name_1 |
||
| mysql flexible-server backup show | cmd mysql flexible-server backup show update parameter server_name: removed property id_part=name |
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for deleting on-demand backups in Azure MySQL flexible servers through the CLI. The implementation updates the Azure MySQL flexible servers SDK to version 1.1.0b1 to enable this functionality.
Key Changes:
- Added new
az mysql flexible-server backup deletecommand - Updated
azure-mgmt-mysqlflexibleserverspackage from version 1.0.0b3 to 1.1.0b1 - Modified backup show command parameter configuration to remove resource ID parsing support
Reviewed changes
Copilot reviewed 9 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/setup.py | Updated azure-mgmt-mysqlflexibleservers dependency to 1.1.0b1 |
| src/azure-cli/requirements.py3.windows.txt | Updated azure-mgmt-mysqlflexibleservers dependency for Windows |
| src/azure-cli/requirements.py3.Linux.txt | Updated azure-mgmt-mysqlflexibleservers dependency for Linux |
| src/azure-cli/requirements.py3.Darwin.txt | Updated azure-mgmt-mysqlflexibleservers dependency for macOS |
| src/azure-cli/azure/cli/command_modules/mysql/commands.py | Added backup delete command registration |
| src/azure-cli/azure/cli/command_modules/mysql/_params.py | Added parameters for backup delete command and modified backup show parameters |
| src/azure-cli/azure/cli/command_modules/mysql/_help.py | Added help documentation for backup delete command |
| src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_scenario.py | Various test updates including SKU changes, location changes, and refactored test assertions |
| src/azure-cli/azure/cli/command_modules/mysql/tests/latest/recordings/test_mysql_flexible_server_maintenance_mgmt.yaml | Updated test recording with new API version and maintenance dates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| c.argument('backup_name', id_part='child_name_1', options_list=['--backup-name', '-b'], help='The name of the backup.') | ||
| c.argument('resource_group_name', arg_type=resource_group_name_type) | ||
| c.argument('server_name', id_part=None, arg_type=server_name_arg_type) | ||
| c.argument('backup_name', options_list=['--backup-name', '-b'], help='The name of the backup.') |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of id_part='child_name_1' from the backup_name argument may be a breaking change. This parameter was previously used to support resource ID parsing for hierarchical resources. If users were previously able to use resource IDs with the backup show command, they will no longer be able to do so. This could break existing automation scripts or workflows. Consider whether this removal is intentional and document it as a breaking change if so, or restore the id_part parameter to maintain backward compatibility.
| c.argument('backup_name', options_list=['--backup-name', '-b'], help='The name of the backup.') | |
| c.argument('backup_name', id_part='child_name_1', options_list=['--backup-name', '-b'], help='The name of the backup.') |
| with self.command_group('mysql flexible-server backup', mysql_flexible_long_running_backup_sdk, | ||
| client_factory=cf_mysql_flexible_backup) as g: | ||
| g.command('create', 'begin_create') | ||
| g.command('delete', 'begin_delete') |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new backup delete command lacks test coverage. The existing FlexibleServerBackupsMgmtScenarioTest test class tests backup create, backup list, and backup show, but does not include a test for the newly added backup delete command. Consider adding a test case that creates a backup and then deletes it to ensure the delete functionality works correctly.
az mysql flexible-server backup delete: Support deletion of on-demand backupaz mysql flexible-server backup delete: Support deletion of on-demand backup
…ort deletion of on-demand backup (#32513)
Related command
az mysql flexible-server backup delete
Description
Need the ability to support deletion of on-demand backup through CLI
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.