{Cosmos DB} az cosmosdb: Add support for API version 2026-03-15(#33303) - #33942
{Cosmos DB} az cosmosdb: Add support for API version 2026-03-15(#33303)#33942pjohari-ms wants to merge 1 commit into
az cosmosdb: Add support for API version 2026-03-15(#33303)#33942Conversation
… 2026-03…" This reverts commit 818b0d2.
|
Hi pjohari-ms, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR re-applies the Cosmos DB management-plane update that was previously reverted, aligning Azure CLI’s Cosmos DB module and its tests/recordings with a newer ARM API version and SDK behavior.
Changes:
- Bump
azure-mgmt-cosmosdbdependency to10.0.0across packaging/requirements. - Refresh Cosmos DB-related live test recordings to use
api-version=2026-03-15and update multiple tests to pass--disable-local-auth true. - Update Cosmos DB module implementation for newer SDK contracts (e.g., PBE field name, restore parameters, mongo role/user model conversions, transformer
todict).
Reviewed changes
Copilot reviewed 25 out of 102 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/setup.py | Updates Cosmos DB management SDK version used by the CLI. |
| src/azure-cli/requirements.py3.windows.txt | Syncs Windows pinned dependency for azure-mgmt-cosmosdb. |
| src/azure-cli/requirements.py3.Linux.txt | Syncs Linux pinned dependency for azure-mgmt-cosmosdb. |
| src/azure-cli/requirements.py3.Darwin.txt | Syncs macOS pinned dependency for azure-mgmt-cosmosdb. |
| src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_private_endpoint_connection_cosmosdb.yaml | Refreshes recording to the newer Cosmos DB ARM API version. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb-burst-capacity-scenario.py | Updates test to create accounts with local auth disabled. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_prpp_autoscale_scenario.py | Updates test to create accounts with local auth disabled. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_priority_based_execution_scenario.py | Updates test to create accounts with local auth disabled. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_fleet_fleetspace_fleetspaceAccount_scenario.py | Tightens Storage Account creation flags and disables local auth for Cosmos account. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py | Updates many scenario tests for --disable-local-auth; adds skips for deprecated service behaviors. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_backuprestore_scenario.py | Updates restore flows to pass --disable-local-auth and optimizes long sleeps during recording. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_postgres_list_cluster.yaml | Removes an unused/obsolete recording. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_mongodb_container_backupinfo.yaml | Removes an unused/obsolete recording. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_locations.yaml | Refreshes location recordings and bumps to api-version=2026-03-15. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py | Updates SDK parameter names, restore signature, restorable list calls, and mongo role/user body conversions for new models. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py | Removes preview flag from fleet-related command groups. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/_transformers.py | Switches to azure.cli.core.util.todict and adjusts vnet rule output rewriting safely. |
| src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py | Adds --disable-local-auth support to az cosmosdb restore. |
Suppressed comments (2)
src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py:708
- The @unittest.skip reason is time-bound ("next PR"), which will become stale and make it harder to understand why the test is skipped later. Please keep the skip message evergreen (and ideally track the longer-term follow-up elsewhere).
src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py:770 - The @unittest.skip reason is time-bound ("next PR"), which will become stale and make it harder to understand why the test is skipped later. Please keep the skip message evergreen (and ideally track the longer-term follow-up elsewhere).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
az cosmosdb: Revert Add support for API version 2026-03-15(#33303)"az cosmosdb: Add support for API version 2026-03-15(#33303)
|
Cosmos DB |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Live Test Result — 1 failed, 4 passed (infrastructure auth issue)
The live test run (Azure/issue-sentinel#32447848539) completed with 1 failure out of 5 tests after ~51 minutes.
CI checks: ✅ All passed (no failed check runs).
Failure summary
The single failing test hit an AuthenticationError raised from azure-cli-core/azure/cli/core/auth/util.py:61 — the test runner's service principal certificate credential expired mid-run. This is a transient infrastructure issue, not caused by code changes in this PR. Four tests passed successfully before the auth expiry occurred.
1 failed, 4 passed in 3090.92s (0:51:30)
AuthenticationError: ... certificate-credentials
Trace ID: 54e157bf-3a47-44ea-9945-e00947a21900
Timestamp: 2026-08-21 05:38:24Z
Recommendation
This failure is not attributable to the CosmosDB API 2026-03-15 changes in this PR. The live test can be re-triggered once the test runner credentials are refreshed. No code changes are needed based on this result.
There was a problem hiding this comment.
Automated Review Summary — Live Test Failed
PR: az cosmosdb: Add support for API version 2026-03-15 (#33303)
Live test result: ❌ Failed
- Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/32447848539
- Head SHA:
77efd61a1fe60ce734389647a6a38bcdaae4f133 - The
azdev test --liverun against the changed CosmosDB test files did not pass.
CI check status: ✅ All required GitHub checks passed (0 failed, 0 pending).
Since the live regression test failed, please review the test run logs at the
link above, fix the failing test(s) or the underlying az cosmosdb API version
2026-03-15 changes, and push an update. The live test will be re-run
automatically against the new commit.
|
🔔 Routing this PR to @Azure/act-codegen-extensibility-squad. |
🤖 PR Validation —⚠️ Review suggested
Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.