Clarify valid units for --max-size in SQL commands - #34080
Alabi Toluwaleke (fvlga) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for your contribution Alabi Toluwaleke (@fvlga)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🟢 Approval recommended
The help-text-only change has no unresolved issues.
Pull request overview
Updates SQL CLI --max-size help text to document supported units and an example.
Changes:
- Lists valid units: B, kB, MB, GB, and TB.
- Adds a
102400MBusage example.
File summaries
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/sql/_params.py |
Updates shared --max-size help text. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
sql |
|
🔔 Routing this PR to @Azure/act-codegen-extensibility-squad. |
Live test skipped⏭️ Skipping the live test for this revision because no changed test file was found ( The live-test pipeline runs only the test files a PR changes, so there is nothing to execute for this commit. A skipped live test is not a passing test result. The Agent review separately checks whether the affected command module includes focused regression tests or updated recordings. If a test file is changed in a later commit, the live test will run automatically. |
There was a problem hiding this comment.
Review: SQL max-size help
The added unit spellings match SizeWithUnitConverter.unit_map, including case-sensitive kB. The diff changes only the shared help string; it does not change parsing, request/response fields, or service behavior. This is not an all-tests-passed result: upstream validation and focused help regression coverage are still missing.
Upstream CI
At head 41441560668787ef8f964f5178c206815d65f215, the sole completed check is license/cla. No upstream build/test validation is present. A maintainer should review eligibility and authorize the standard PR validation for this head; automated fork validation did not satisfy the approved-author gate. Obtain the applicable title/content, lint, and test results before merge.
Test validation
- Live test: Skipped: no runnable changed test files were found.
- Regression coverage: Gap detected for
sql: production behavior changed without a focused test or recording change.
The coverage warning is the production-path gate for sql; here the customer-visible change is help output, not runtime requests. Add a focused regression test in src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_params.py (new): assert that rendered --max-size help includes the accepted unit list, byte default, and example for the shared database and elastic-pool commands. The assertion must fail with the old help string, rather than only testing the unchanged converter. Run azdev test test_sql_params and check az sql db create --help, az sql db update --help, az sql elastic-pool create --help, and az sql elastic-pool update --help against this head. No HTTP recording needs re-recording solely for this help-only edit.
Release artifact finding
sql/_params.py:202 changes customer-facing command help, but the PR title has no [SQL] component prefix and History Notes is N/A, leaving the change without the required release-note representation. Use a customer-facing [SQL] title, for example [SQL] `az sql db create`: Clarify valid --max-size units, or add the corresponding entry under History Notes. Leave generated HISTORY.rst files untouched, and verify the title/content gate once standard PR validation runs.
Risk assessment
31/100 · Medium · High confidence
The Medium rating is driven by public CLI behavior, no changed regression test.
- Change scope: 1 changed file, 2 changed lines (
+1/-1), including 1 production file. - Affected components:
sql - Risk drivers: public CLI behavior (+18); no changed regression test (+10)
- Regression evidence: No changed regression test was detected for the production changes, increasing risk.
- Confidence: High because changed-line patches were available for every production file.
- Required review: Owning-squad review is recommended for
sqlbefore merge.
|
🔔 Routing this PR to @Azure/act-codegen-extensibility-squad. |
Related command
az sql db create, az sql db update, az sql elastic-pool create
Description
Addressing #13290.
The
--max-sizehelp text stated units default to bytes (B) if unspecified, but never listed which unit suffixes are actually accepted. This adds the valid unit list (B, kB, MB, GB, TB) plus an example, taken directly fromSizeWithUnitConverter'sunit_mapin_params.py, which is the actual parser backing this argument.Since
max_size_bytes_param_typeis a sharedCLIArgumentTypeused bysql db create,sql db update, andsql elastic-pool create, this one change fixes the help text everywhere--max-sizeis used.Testing Guide
Ran
az sql db create --helpandaz sql elastic-pool create --helpand confirmed the updated--max-sizehelp text appears in both. No functional change — help text only.History Notes
N/A
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.