-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[dataprotection] ADLS backup + rename restore containers #9384
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
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| dataprotection backup-instance initialize | cmd dataprotection backup-instance initialize update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance initialize-backupconfig | cmd dataprotection backup-instance initialize-backupconfig update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance initialize-restoreconfig | cmd dataprotection backup-instance initialize-restoreconfig update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance list-from-resourcegraph | cmd dataprotection backup-instance list-from-resourcegraph update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance restore initialize-for-data-recovery | cmd dataprotection backup-instance restore initialize-for-data-recovery update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance restore initialize-for-data-recovery-as-files | cmd dataprotection backup-instance restore initialize-for-data-recovery-as-files update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance restore initialize-for-item-recovery | cmd dataprotection backup-instance restore initialize-for-item-recovery update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-instance update-msi-permissions | cmd dataprotection backup-instance update-msi-permissions update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection backup-policy get-default-policy-template | cmd dataprotection backup-policy get-default-policy-template update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
||
| dataprotection job list-from-resourcegraph | cmd dataprotection job list-from-resourcegraph update parameter datasource_type: updated property choices from ['AzureBlob', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] to ['AzureBlob', 'AzureDataLakeStorage', 'AzureDatabaseForMySQL', 'AzureDatabaseForPostgreSQL', 'AzureDatabaseForPostgreSQLFlexibleServer', 'AzureDisk', 'AzureKubernetesService'] |
|
Hi @IannGeorges, |
|
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>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
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 adds support for Azure Data Lake Storage (ADLS) backup and restore functionality to the Azure DataProtection CLI extension. The key changes include extending existing blob storage backup logic to support ADLS, updating tests to use pre-created resource groups instead of dynamic ones, and adding new test cases for ADLS-specific scenarios.
Reviewed Changes
Copilot reviewed 72 out of 85 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test_dataprotection_backup_vault.py | Removed ResourceGroupPreparer decorators and set resource group to 'dataprotectionclitest-rg', removed trailing comma |
| test_dataprotection_backup_policy.py | Removed ResourceGroupPreparer, added ADLS policy test case, commented out PostgreSQL test, updated to use pre-created resource group |
| test_dataprotection_backup_instance_restore.py | Renamed variable from 'restoreContainerName' to 'targetStorageAccount', added two new ADLS restore test cases including ILR validation |
| test_dataprotection_backup_instance_operations.py | Added unittest skip decorator, commented out MSI permission commands, changed permissions scope, added sleep delays |
| test_dataprotection_backup_instance_create_and_delete.py | Removed skip decorator from blob test, added comprehensive ADLS create/delete test case with policy validation |
| test_dataprotection_backup_and_restore_workloads.py | Added skip decorator to AKS test |
| test_dataprotection_backup_vault_list_from_resource_graph.yaml | Updated recording with new CLI version, dates, and operation identifiers |
| test_dataprotection_backup_vault_create_with_uami_update_and_delete.yaml | Updated recording with new API version, CLI version, resource group, and operation identifiers |
| custom.py | Extended conditions to include AzureDataLakeStorage alongside AzureBlob, added datasource_type parameter to get_blob_backupconfig call |
| test.exists("[?name == '{vaultName}']") | ||
| ]) | ||
|
|
||
| @unittest.skip("Temporary skip to allow ADLS PR through") |
Copilot
AI
Nov 4, 2025
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.
The skip reason 'Temporary skip to allow ADLS PR through' suggests this is a temporary measure. Consider adding a TODO comment or tracking issue reference to ensure this test is re-enabled after the ADLS changes are stabilized.
|
|
||
| backup_config_json = test.cmd('az dataprotection backup-instance initialize-backupconfig --datasource-type "{dataSourceType}" ' | ||
| '--include-all-containers --storage-account-rg "{rg}" --storage-account-name "{storageAccountName}"').get_output_in_json() | ||
| print(backup_config_json) |
Copilot
AI
Nov 4, 2025
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.
Debug print statement left in production code. This should be removed or replaced with proper logging using the logger module already imported in the file.
| ' --included-namespaces, --label-selectors, --snapshot-volumes, --include-cluster-scope-resources, ' | ||
| ' --backup-hook-references for given datasource type.') | ||
| return helper.get_blob_backupconfig(cmd, client, vaulted_backup_containers, include_all_containers, storage_account_name, storage_account_resource_group) | ||
| return helper.get_blob_backupconfig(cmd, client, vaulted_backup_containers, include_all_containers, storage_account_name, storage_account_resource_group, datasource_type) |
Copilot
AI
Nov 4, 2025
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.
The function is named 'get_blob_backupconfig' but is now being used for both Blob and ADLS datasource types. Consider renaming the function to 'get_storage_backupconfig' or creating a separate function for ADLS to maintain clarity and separation of concerns.
|
@evelyn-ys Could you please review PR at your earliest convenience? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| @@ -2,6 +2,10 @@ | |||
|
|
|||
| Release History | |||
| =============== | |||
| 1.7.0 | |||
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.
I didn't see the new version being updated anywhere
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.
@evelyn-ys Updated setup.py to reflect new version
|
@evelyn-ys Can you please rerun pipeline? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@yonzhan Can you please rerun pipeline? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@yonzhan could you please rerun the pipeline? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@evelyn-ys could you please review PR once more? |
|
@zhoxing-ms @calvinhzy could you please review PR? |
|
[Release] Update index.json for extension [ dataprotection-1.7.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=142819082&view=results |
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.