Fix/mysql memory optimized terminology - #34019
Open
ShawnX (ShawnXxy) wants to merge 3 commits into
Open
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
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.
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.' | ||
| ) |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Collaborator
|
mysql |
…d tests to address copilot review comments
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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.