Skip to content

Fix/mysql memory optimized terminology - #34019

Open
ShawnX (ShawnXxy) wants to merge 3 commits into
Azure:devfrom
ShawnXxy:fix/mysql-memory-optimized-terminology
Open

Fix/mysql memory optimized terminology#34019
ShawnX (ShawnXxy) wants to merge 3 commits into
Azure:devfrom
ShawnXxy:fix/mysql-memory-optimized-terminology

Conversation

@ShawnXxy

@ShawnXxy ShawnX (ShawnXxy) commented Sep 2, 2026

Copy link
Copy Markdown

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️mysql
rule cmd_name rule_message suggest_message
⚠️ 1008 - ParaPropAdd mysql flexible-server create cmd mysql flexible-server create update parameter tier: added property type=custom_type
⚠️ 1008 - ParaPropAdd mysql flexible-server geo-restore cmd mysql flexible-server geo-restore update parameter tier: added property type=custom_type
⚠️ 1008 - ParaPropAdd mysql flexible-server import create cmd mysql flexible-server import create update parameter tier: added property type=custom_type
⚠️ 1008 - ParaPropAdd mysql flexible-server replica create cmd mysql flexible-server replica create update parameter tier: added property type=custom_type
⚠️ 1008 - ParaPropAdd mysql flexible-server restore cmd mysql flexible-server restore update parameter tier: added property type=custom_type
⚠️ 1008 - ParaPropAdd mysql flexible-server update cmd mysql flexible-server update update parameter tier: added property type=custom_type

Related command

Description

Addressing #32827 .

It was initially introduced in PR #22241 for business requirement.

Changes for wordings in below two commits of this PR:
1- commit 1c25ad2e5a Using "MemoryOptimized" for tier name but also accept "BusinessCritical" backward compatibility for legacy term
2-commit b4c7c9d9b8 Update help text for parameter "--accelerated-logs" that is supported both GeneralPurpose and MemoryOptimized tier now, which was introduced in feature PR #29936

Testing Guide

Text checks

$commands = @('create', 'restore', 'geo-restore', 'update')

foreach ($command in $commands) {
    $help = (& .\.venv\Scripts\az.bat mysql flexible-server $command --help 2>&1) -join "`n"

    [pscustomobject]@{
        Command          = $command
        MemoryOptimized  = $help -match 'Memory\s+Optimized'
        BusinessCritical = $help -match 'Business\s+Critical'
    }
}

Regression test

.\.venv\Scripts\python.exe -m pytest `
  src\azure-cli\azure\cli\command_modules\mysql\tests\latest\test_mysql_custom.py -q

Module checks

$env:VIRTUAL_ENV = (Resolve-Path .venv).Path

.\.venv\Scripts\azdev.exe style mysql --pylint --pep8
.\.venv\Scripts\azdev.exe linter mysql --min-severity high

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

Copilot AI lite review requested due to automatic review settings September 2, 2026 03:12
@ShawnXxy
ShawnX (ShawnXxy) requested a review from a team as a code owner September 2, 2026 03:12
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Backward-compatibility for --tier BusinessCritical appears incomplete (restore/georestore still validate without normalization), and the updated --accelerated-logs help omits the tier-dependent default behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates Azure MySQL Flexible Server CLI terminology to use “MemoryOptimized” (instead of “BusinessCritical”) while keeping legacy support, and adjusts related UX/help/tests in the mysql command module.

Changes:

  • Normalize --tier BusinessCritical to MemoryOptimized for create/import/update flows.
  • Stop rewriting the tier name in flexible-server list-skus so it preserves MemoryOptimized.
  • Update --accelerated-logs help text and add unit coverage for accelerated-logs tier behavior and list-skus tier naming.
File summaries
File Description
src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_custom.py Adds unit tests for accelerated logs tier defaults and for list-skus preserving MemoryOptimized.
src/azure-cli/azure/cli/command_modules/mysql/custom.py Adds legacy alias mapping in several command flows and changes list-skus to return raw tier names.
src/azure-cli/azure/cli/command_modules/mysql/_validators.py Updates tier-related error messaging to “Memory Optimized”.
src/azure-cli/azure/cli/command_modules/mysql/_util.py Removes tier-rewrite helper so list-skus no longer transforms MemoryOptimized to BusinessCritical.
src/azure-cli/azure/cli/command_modules/mysql/_params.py Updates --accelerated-logs help text to reflect new tier support.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 363 to 366
# Accept BusinessCritical as a legacy alias; service capabilities use MemoryOptimized.
if tier == 'BusinessCritical':
tier = 'MemoryOptimized'
mysql_arguments_validator(db_context,
Comment on lines 119 to 123
accelerated_logs_arg_type = CLIArgumentType(
arg_type=get_enum_type(['Enabled', 'Disabled']),
options_list=['--accelerated-logs'],
help='Enable or disable accelerated logs. Only support for Business Critical tier. Default value is Enabled.'
help='Enable or disable accelerated logs. Supported for General Purpose and Memory Optimized tiers.'
)
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yonzhan

Copy link
Copy Markdown
Collaborator

mysql

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants