Skip to content

Clarify valid units for --max-size in SQL commands - #34080

Open
Alabi Toluwaleke (fvlga) wants to merge 2 commits into
Azure:devfrom
fvlga:fix-sql-max-size-units-doc
Open

Alabi Toluwaleke (fvlga) wants to merge 2 commits into
Azure:devfrom
fvlga:fix-sql-max-size-units-doc

Conversation

@fvlga

Copy link
Copy Markdown

Related command

az sql db create, az sql db update, az sql elastic-pool create

Description

Addressing #13290.

The --max-size help 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 from SizeWithUnitConverter's unit_map in _params.py, which is the actual parser backing this argument.

Since max_size_bytes_param_type is a shared CLIArgumentType used by sql db create, sql db update, and sql elastic-pool create, this one change fixes the help text everywhere --max-size is used.

Testing Guide

Ran az sql db create --help and az sql elastic-pool create --help and confirmed the updated --max-size help 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.

Copilot AI lite review requested due to automatic review settings September 15, 2026 01:38
@fvlga
Alabi Toluwaleke (fvlga) requested a review from a team as a code owner September 15, 2026 01:38
@azure-pipelines

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

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 15, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution Alabi Toluwaleke (@fvlga)! We will review the pull request and get back to you soon.

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.

🟢 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 102400MB usage 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.

@yonzhan

Copy link
Copy Markdown
Collaborator

sql

@a0x1ab Aditya Pujara (a0x1ab) added the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 15, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-codegen-extensibility-squad.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test skipped

⏭️ Skipping the live test for this revision because no changed test file was found (tests/**/test_*.py).

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.

@x-engineering-agent x-engineering-agent Bot 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.

Alabi Toluwaleke (@fvlga)

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 sql before merge.

@x-engineering-agent x-engineering-agent Bot added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed Request X Engineering Agent Request X Engineering Agent testing and review labels Sep 15, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-codegen-extensibility-squad.

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

Labels

act-codegen-extensibility-squad Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. SQL az sql X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants