-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[CosmosDB] az cosmosdb restore: Cross region restore update
#32589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @dsapaliga, |
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the handling of the source_backup_location parameter for cross-region restore operations in CosmosDB. The parameter was incorrectly being set on DatabaseAccountCreateUpdateParameters instead of on the RestoreParameters object, and the feature is being moved out of preview status.
- Moved
source_backup_locationfromDatabaseAccountCreateUpdateParameterstoRestoreParametersobject - Removed the
is_preview=Trueflag from thesource_backup_locationargument definition
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py |
Fixed bug by setting source_backup_location on restore_parameters object (lines 370-371) instead of on DatabaseAccountCreateUpdateParameters (removed from line 405) |
src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py |
Removed is_preview=True flag from source_backup_location argument, indicating the feature is now generally available |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please fix CI issues |
|
@yonzhan the errors in the CI seems to be specifically for the rdbms module, I am only editing a specific section under cosmosdb. Can you please point out why the CI shows errors for another module in my PR? azure-cli/src/azure-cli/azure/cli/command_modules/rdbms/_params.py |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
az cosmosdb restore: fixes for cross region restore
az cosmosdb restore: fixes for cross region restoreaz cosmosdb restore: Fixes for cross region restore
az cosmosdb restore: Fixes for cross region restoreaz cosmosdb restore: Fix for cross region restore
|
/azp run |
|
Commenter does not have sufficient privileges for PR 32589 in repo Azure/azure-cli |
| c.argument('zonal_resiliency', arg_type=zonal_resiliency_arg_type, default="Disabled") | ||
| c.argument('allow_same_zone', arg_type=allow_same_zone_arg_type, default=False) | ||
| c.argument('database_name', arg_type=database_name_create_arg_type) | ||
| c.argument('database_name', arg_type=database_name_arg_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: why do we need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were build/linter failures which was not moving ahead without this fix. I asked the CLI team about this they have asked me to fix it. If you see the previous commits, they have failed pipelines due to this.
I know its not our module, but I didnt see a choice.
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
lgtm |
vinhms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
This reverts commit ddd2095.
az cosmosdb restore: Fix for cross region restoreaz cosmosdb restore: Cross region restore update
Related command
az cosmosdb restore
Description
This is a simple fix for az cosmosdb restore command where we are enabling a new feature via a new parameter - source-backup-location. This feature is now being GA'd and was released in december in this PR - #32390, but had a bug that needed fixing.
Testing Guide
az cosmosdb restore -n "" -g "" -a "" --restore-timestamp 2023-08-10T07:16:21Z --source-backup-location "Central US EUAP" --location "Central US EUAP"
History Notes
[CosmosDB]
az cosmosdb restore: Fix for cross region restore for cosmosdbThis 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.