[CosmosDB][DoNotMerge] API Version 2026-04-01-preview changes#9839
Open
pjohari-ms wants to merge 22 commits into
Open
[CosmosDB][DoNotMerge] API Version 2026-04-01-preview changes#9839pjohari-ms wants to merge 22 commits into
pjohari-ms wants to merge 22 commits into
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @pjohari-ms, |
Collaborator
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
Contributor
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
- Add softdeleted-account, softdeleted-database, softdeleted-container command groups for list, show, recover (restore), and delete (purge) - Fix ManagedServiceIdentityUserAssignedIdentity rename (singular->plural) - Fix Location model impedance (bundled vs vendored SDK types) - Route cosmosdb_sql_sdk through vendored SDK for consistency - Unwrap list results (.value) for new SDK response shape - Add env-var override for API version targeting older stamps - Add 6 scenario tests (account/database/container x recover/purge) - All 6 tests pass live against test12 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…p, command groups) - Add client factories for soft-deleted accounts/databases/containers - Add command group registrations to wire custom.py functions as CLI commands - Add parameter definitions for all soft-delete commands - Add help text with examples for all soft-delete commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add --soft-deletion-enabled, --sd-retention, --min-purge-minutes params to cosmosdb update - Wire soft_delete_configuration through cli_cosmosdb_update, cli_cosmosdb_create, and _create_database_account - Add help example for enabling soft deletion via cosmosdb update Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 1.7.0 release notes for soft-delete command groups - Add linter exclusions for softdeleted-database/container list commands (no_ids_for_list_commands - these use location-based params, not resource IDs) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6-04-01-preview - Switched recordings to public Azure (management.azure.com) from CanaryCloud (centraluseuap) - Updated API version from 2025-11-01-preview to 2026-04-01-preview (matches manifest) - Switched test region from westus to westus2 (sub capacity) - Added RG tagging to bypass Az.Sec.DisableLocalAuth.CosmosDB policy on test infra - Removed unreliable ARM 'cosmosdb show' check after account recover (stale-cache); rely on soft-deleted-list canonical check - All 6 tests passed live (~33min) and in playback (~12s) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The cosmosdb_sql_sdk redirect to vendored SDK was unrelated cleanup that crept into the soft-delete PR. Soft-delete commands use their own SDK types (cosmosdb_softdeleted_*_sdk) which are unaffected. Reverted both occurrences (line 58 and duplicate at line 320) back to the public azure.mgmt.cosmosdb.operations#SqlResourcesOperations namespace. Verified: all 6 soft-delete playback tests still PASS (11.82s). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the new Continuous35Days (PITR Premium) continuous backup tier alongside the existing Continuous7Days and Continuous30Days tiers. - Update README with create/update examples for 35-day retention - Add test_cosmosdb_sql_continuous35days provisioning test - Extend periodic-to-continuous migration test to cover 35-day upgrade Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…AssignedIdentities - Add live test recording for test_cosmosdb_sql_continuous35days - Update recording for test_cosmosdb_sql_migrate_periodic_to_continuous7days - Fix renamed SDK class: ManagedServiceIdentityUserAssignedIdentity -> ManagedServiceIdentityUserAssignedIdentities Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Continuous35Days backup tier support for CosmosDB
# Conflicts: # src/cosmosdb-preview/HISTORY.rst
Switch soft-delete operations_tmpl and model imports from the vendored SDK path to azure.mgmt.cosmosdb. The regenerated SDK will provide these classes at this path.
Collapses the three soft-delete update flags (--soft-deletion-enabled, --sd-retention, --min-purge-minutes) into one --soft-delete-config argument that maps to the single soft_delete_configuration property on the account. The value is accepted as a JSON object or a path to a JSON file and is parsed/validated into a SoftDeleteConfiguration model via a new validator. Soft delete can only be configured via update (platform limitation), so the non-functional create-time wiring is removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
[CosmosDB] Add soft-delete CLI support for SQL databases and containers and Accounts
Pan-Qi
approved these changes
Jun 22, 2026
Pan-Qi
reviewed
Jun 22, 2026
Pan-Qi
left a comment
Contributor
There was a problem hiding this comment.
Please fix the linting issue.
Pan-Qi
requested changes
Jun 22, 2026
- Fix mongo role/user definition handlers to use keyword arguments after the regenerated SDK reordered parameters to (resource_group_name, account_name, <id>, parameters) - Fix SoftDeleteConfiguration import to load from the vendored SDK instead of the base azure-mgmt-cosmosdb package - Add --disable-local-auth support to 'cosmosdb create' and 'cosmosdb restore'
- Re-record passing scenario tests against the new API version - Add --disable-local-auth to account creation in scenario tests (SafeSecrets policy requirement) - Remap regions for environment-gated in-account restore tests
…eview - Set ResourceGroupPreparer location to a PITR-enabled region so the account ARM location (derived from the resource group) supports continuous backup - Re-record InAccountRestore (SQL/Mongo), Table/Gremlin restore, and continuous-tier scenario tests - All 18 regenerated cassettes verified in playback
- mongocluster crud/firewall require M40+HA tier availability not present in the recording subscription - sql throughput bucketing runs against a pre-existing feature-flagged account and is not recordable
…04-01-preview - Remap table_account_restore_using_create from westus2 to eastus2 where Table + continuous backup is supported - Cassette regenerated and verified in playback
Contributor
|
lgtm |
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.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.