Skip to content

[CosmosDB] Fix #8080: az cosmosdb: Fix malformed redistribute-partition-throughput help examples - #10209

Open
Hashim Khan (Hashim1999164) wants to merge 2 commits into
Azure:mainfrom
Hashim1999164:fix/cosmosdb-redistribute-help-typo-8080
Open

[CosmosDB] Fix #8080: az cosmosdb: Fix malformed redistribute-partition-throughput help examples#10209
Hashim Khan (Hashim1999164) wants to merge 2 commits into
Azure:mainfrom
Hashim1999164:fix/cosmosdb-redistribute-help-typo-8080

Conversation

@Hashim1999164

@Hashim1999164 Hashim Khan (Hashim1999164) commented Aug 13, 2026

Copy link
Copy Markdown

🤖 PR Validation — ❌ Action needed

Breaking Changes
❌ 1
❌Azure CLI Extensions Breaking Change Test
❌quantum
rule cmd_name rule_message suggest_message
1002 - CmdRemove quantum workspace user list cmd quantum workspace user list removed please confirm cmd quantum workspace user list removed

Summary

Fixes #8080

Removes the stray ]' / ' characters from the Cosmos DB redistribute-partition-throughput help examples for SQL containers and MongoDB collections so the sample commands are valid.

Test plan

  • Confirm the SQL container redistribute example no longer ends values with ]'
  • Confirm the MongoDB collection redistribute example no longer ends values with a trailing '

Copilot AI lite review requested due to automatic review settings August 13, 2026 00:07
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Hashim Khan (@Hashim1999164),
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@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 Aug 13, 2026

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.

Pull request overview

Removes stray trailing bracket/quote characters from Cosmos DB redistribute-partition-throughput help examples in the cosmosdb-preview extension so the sample commands are valid when copied from CLI help.

Changes:

  • Fix SQL container redistribute example by removing the trailing ]' and using a valid --source-partition-info value.
  • Fix MongoDB collection redistribute example by removing the trailing ' characters and using a valid --source-partition-info value.

💡 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

cosmosdb

@Hashim1999164

Copy link
Copy Markdown
Author

Added a HISTORY.rst entry and bumped cosmosdb-preview to 1.7.1 for the redistribute help example fix.

@coopercox-ms Cooper Cox (coopercox-ms) changed the title Fix stray brackets in redistribute-partition-throughput help examples [CosmosDB] Fix #8080: az cosmosdb: Fix malformed redistribute-partition-throughput help examples Aug 24, 2026
@coopercox-ms

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@coopercox-ms

Copy link
Copy Markdown
Member

please address the feedback in the failed tests and commit a fix

@x-engineering-agent

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

CI Review Summary

Upstream CI

Azure.azure-cli-extensions build 341169 — failure

  • azdev linter on Modified Extensions / azdev style on Modified Extensions: the quoted task-log evidence references src/quantum/azext_quantum/... and src/quantum/setup.py — files this PR never touches (it only modifies src/cosmosdb-preview/HISTORY.rst, _help.py, and setup.py). This build output does not correspond to this PR's changes; classified not PR-related.
  • Next action: re-run the two failed jobs; if the quantum-extension diagnostic persists, escalate to the pipeline owner rather than changing this PR's cosmosdb-preview source.

Test validation

  • Live test: skipped — this PR only edits help text and HISTORY.rst, no tests/**/test_*.py files.
  • Regression coverage: not applicable — no command-module production code changed, only help examples.

Repository policy findings

None.

Classification

All current failures are not PR-related (stale/shared build output for an unrelated quantum extension). No source change is requested; recommend re-running the two failed jobs.

@coopercox-ms

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@x-engineering-agent x-engineering-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Azure-Client-Tools-Agent,

Upstream CI

Azure.azure-cli-extensions

  • Result: failure

  • Included checks: Integration Tests, Build Tests Python313/Python314/Python310/Python311/Python312, azdev linter on Modified Extensions, azdev style on Modified Extensions

  • Integration Tests (all Python versions) — Not PR-related. All 49 failures are in src/cosmosdb-preview/azext_cosmosdb_preview/tests/latest/test_cosmosdb_sql_adaptiveru_scenario.py, test_cosmosdb_sql_materializedview_scenario.py, test_cosmosdb_table_rbac_assignment_scenario.py and test_cosmosdb_table_rbac_scenario.py. This PR only changes HISTORY.rst, _help.py (help text) and setup.py (version bump) — no test files, no client/command logic. These recorded scenario tests were already failing independently of this PR's diff.

    • Next action: No source change requested for this failure; recommend re-running or investigating the underlying cosmosdb-preview scenario test recordings/environment separately from this PR.
    • Verify: Re-run Integration Tests, Build Tests after confirming the pre-existing cosmosdb-preview test failures are fixed independently.
  • azdev linter / azdev style on Modified Extensions — Not PR-related. Both failures report src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py and src/quantum/setup.py modifying src/index.json alongside source code — the quantum extension is not touched anywhere in this PR (only cosmosdb-preview files changed). This is a leftover/aggregate lint failure from another change in the build, not from this PR's diff.

    • Next action: No source change requested for this failure; recommend re-running the linter/style checks or verifying isolation between concurrent extension builds.
    • Verify: Re-run azdev linter on Modified Extensions and azdev style on Modified Extensions and confirm the quantum-related diagnostic no longer appears for this PR.

Test validation

  • Live test: Skipped: no runnable changed test files were found (PR changes no tests/**/test_*.py files).
  • Regression coverage: Not applicable — the change is help-text and version metadata only.

Review-skill findings

No deterministic skill findings. Semantic checks confirm this PR's diff is scoped correctly to cosmosdb-preview help text/version/HISTORY, matching the stated title and issue #8080.

Summary: All 8 failing checks reference cosmosdb-preview scenario tests and quantum extension files that are unrelated to this PR's actual diff (_help.py/HISTORY.rst/setup.py only). No source change is requested; recommend rerunning/escalating these unrelated failures.

@coopercox-ms

Copy link
Copy Markdown
Member

Hashim Khan (@Hashim1999164) please fix the issues found by the failing tests

@Hashim1999164

Copy link
Copy Markdown
Author

Hi Cooper, thanks for taking a look.

The GitHub azdev linter and azdev style checks on this PR are passing. The Azure Pipelines failures are not coming from the help example edits.

This PR only changes three files in the cosmosdb preview extension: the help examples, HISTORY.rst, and the version in setup.py. No test files and no command logic were changed.

The integration job reports 49 failed scenario tests (16 passed, 11 skipped). Those failures are playback cassette errors in the existing cosmosdb preview scenario tests (PITR, in account restore, softdelete, adaptive RU, table RBAC, and similar). They do not exercise the redistribute help examples.

The Azure Pipelines azdev linter and style jobs also failed before running those tools, because the changed file list included quantum extension files and src/index.json together. This PR does not touch quantum or index.json.

Happy to rerun pipelines if that helps. I do not think a source change on this PR will clear those failures.

@coopercox-ms

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@a0x1ab Aditya Pujara (a0x1ab) added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed azure-client-tools-agent labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customer feedback | az cosmosdb sql container | Incorrect example

6 participants