Skip to content

Conversation

@honghr
Copy link
Contributor

@honghr honghr commented Dec 4, 2025

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 feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings December 4, 2025 09:04
@honghr honghr requested a review from evelyn-ys as a code owner December 4, 2025 09:04
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 4, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@yonzhan
Copy link
Collaborator

yonzhan commented Dec 4, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Dec 4, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️mysql
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd mysql flexible-server backup delete cmd mysql flexible-server backup delete added
⚠️ 1009 - ParaPropRemove mysql flexible-server backup show cmd mysql flexible-server backup show update parameter backup_name: removed property id_part=child_name_1
⚠️ 1009 - ParaPropRemove mysql flexible-server backup show cmd mysql flexible-server backup show update parameter server_name: removed property id_part=name

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a 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 delete command
  • Updated azure-mgmt-mysqlflexibleservers package 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.')
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
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.')

Copilot uses AI. Check for mistakes.
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')
Copy link

Copilot AI Dec 4, 2025

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.

Copilot uses AI. Check for mistakes.
@evelyn-ys evelyn-ys merged commit 48fc08b into Azure:dev Dec 5, 2025
48 checks passed
@evelyn-ys evelyn-ys changed the title [MySQL] az mysql flexible-server backup delete: Support deletion of on-demand backup {MySQL} az mysql flexible-server backup delete: Support deletion of on-demand backup Dec 9, 2025
evelyn-ys pushed a commit that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Backup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants