Skip to content

[MySQL] az mysql flexible-server backup create/restore/geo-restore/replica: Remove --storage-redundancy#33428

Open
honghr wants to merge 2 commits into
Azure:devfrom
honghr:bk-remove-storage-redundancy
Open

[MySQL] az mysql flexible-server backup create/restore/geo-restore/replica: Remove --storage-redundancy#33428
honghr wants to merge 2 commits into
Azure:devfrom
honghr:bk-remove-storage-redundancy

Conversation

@honghr
Copy link
Copy Markdown
Contributor

@honghr honghr commented May 22, 2026

Related command

az mysql flexible-server create --storage-redundancy
az mysql flexible-server restore --storage-redundancy
az mysql flexible-server geo-restore --storage-redundancy
az mysql flexible-server replica --storage-redundancy
Description

Remove storage redundancy for mysql server creation, restore and replica. Backend has been not supported this feature.

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 May 22, 2026 08:18
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 22, 2026

️✔️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
️✔️postgresql
️✔️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

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

Hi @honghr,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

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

azure-client-tools-bot-prd Bot commented May 22, 2026

❌AzureCLI-BreakingChangeTest
❌mysql
rule cmd_name rule_message suggest_message
1007 - ParaRemove mysql flexible-server create cmd mysql flexible-server create removed parameter storage_redundancy please add back parameter storage_redundancy for cmd mysql flexible-server create
1007 - ParaRemove mysql flexible-server geo-restore cmd mysql flexible-server geo-restore removed parameter storage_redundancy please add back parameter storage_redundancy for cmd mysql flexible-server geo-restore
1007 - ParaRemove mysql flexible-server replica create cmd mysql flexible-server replica create removed parameter storage_redundancy please add back parameter storage_redundancy for cmd mysql flexible-server replica create
1007 - ParaRemove mysql flexible-server restore cmd mysql flexible-server restore removed parameter storage_redundancy please add back parameter storage_redundancy for cmd mysql flexible-server restore

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 22, 2026

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

@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

This PR removes support for the --storage-redundancy option from Azure CLI MySQL flexible server commands and stops sending a storage_redundancy field in storage model payloads.

Changes:

  • Remove storage_redundancy parameters from command implementations and models.Storage(...) construction.
  • Remove CLI argument registration for --storage-redundancy across create/restore/geo-restore/replica create.
  • Remove breaking-change deprecation registrations for --storage-redundancy.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/azure-cli/azure/cli/command_modules/mysql/custom.py Drops storage_redundancy from command signatures and storage payload construction.
src/azure-cli/azure/cli/command_modules/mysql/_params.py Removes --storage-redundancy argument type and registrations from command parameter wiring.
src/azure-cli/azure/cli/command_modules/mysql/_breaking_change.py Removes the deprecation registrations for --storage-redundancy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 772 to 777
else:
auto_io_scaling = _determine_auto_io_scaling_by_faster_restore(faster_restore)

if not storage_redundancy:
storage_redundancy = source_server_object.storage.storage_redundancy

if not backup_retention:
backup_retention = source_server_object.backup.backup_retention_days
else:
storage = models.Storage(storage_size_gb=storage_gb, iops=iops, auto_grow=auto_grow,
auto_io_scaling=auto_io_scaling,
log_on_disk=accelerated_logs, storage_redundancy=storage_redundancy)
log_on_disk=accelerated_logs)
Comment on lines 366 to 369
c.argument('public_access', arg_type=public_access_create_arg_type)
c.argument('vnet', arg_type=vnet_arg_type)
c.argument('vnet_address_prefix', arg_type=vnet_address_prefix_arg_type)
c.argument('storage_redundancy', arg_type=storage_redundancy_arg_type, default="LocalRedundancy")
c.argument('subnet', arg_type=subnet_arg_type)
@@ -2,10 +2,3 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@yonzhan yonzhan assigned calvinhzy and unassigned evelyn-ys and zhoxing-ms May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants