[MySQL] Fix #32827: Restore Memory Optimized tier terminology - #34019
ShawnX (ShawnXxy) wants to merge 3 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 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 BusinessCriticaltoMemoryOptimizedfor create/import/update flows. - Stop rewriting the tier name in
flexible-server list-skusso it preservesMemoryOptimized. - Update
--accelerated-logshelp 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.
| # Accept BusinessCritical as a legacy alias; service capabilities use MemoryOptimized. | ||
| if tier == 'BusinessCritical': | ||
| tier = 'MemoryOptimized' | ||
| mysql_arguments_validator(db_context, |
| 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.' | ||
| ) |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
mysql |
…d tests to address copilot review comments
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Yong Zhang (@yonzhan) Ethan Yang (@necusjz) could we check this so we can still checkin in October train? Thanks. |
|
Please fix CI issues |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 34019 in repo Azure/azure-cli |
Yong Zhang (@yonzhan) check the failure log, it is about the title format. I have updated the title but lack of privileges to trigger a new validation |
🤖 PR Validation —⚠️ Review suggested
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
1c25ad2e5aUsing "MemoryOptimized" for tier name but also accept "BusinessCritical" backward compatibility for legacy term2-commit
b4c7c9d9b8Update help text for parameter "--accelerated-logs" that is supported both GeneralPurpose and MemoryOptimized tier now, which was introduced in feature PR #29936Testing Guide
Text checks
Regression test
Module checks
This 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.