Skip to content

Conversation

@IannGeorges
Copy link
Member

@IannGeorges IannGeorges commented Nov 4, 2025


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings November 4, 2025 05:36
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Nov 4, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️dataprotection
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']
⚠️ 1010 - ParaPropUpdate 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']

@azure-client-tools-bot-prd
Copy link

Hi @IannGeorges,
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 setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Copy link
Contributor

Copilot AI left a 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")
Copy link

Copilot AI Nov 4, 2025

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.

Copilot uses AI. Check for mistakes.

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)
Copy link

Copilot AI Nov 4, 2025

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.

Copilot uses AI. Check for mistakes.
' --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)
Copy link

Copilot AI Nov 4, 2025

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.

Copilot uses AI. Check for mistakes.
@IannGeorges
Copy link
Member Author

@evelyn-ys Could you please review PR at your earliest convenience?

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@@ -2,6 +2,10 @@

Release History
===============
1.7.0
Copy link
Member

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

Copy link
Member Author

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

@IannGeorges IannGeorges changed the title [dataprotection] ADLS Backup + Rename Containers [dataprotection] ADLS backup + rename restore containers Nov 4, 2025
@IannGeorges
Copy link
Member Author

@evelyn-ys Can you please rerun pipeline?

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@IannGeorges
Copy link
Member Author

@yonzhan Can you please rerun pipeline?

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 5, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@IannGeorges
Copy link
Member Author

@yonzhan could you please rerun the pipeline?

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 5, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@IannGeorges
Copy link
Member Author

@evelyn-ys could you please review PR once more?

@IannGeorges
Copy link
Member Author

@zhoxing-ms @calvinhzy could you please review PR?

@evelyn-ys evelyn-ys merged commit b363efa into Azure:main Nov 6, 2025
25 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Nov 6, 2025

[Release] Update index.json for extension [ dataprotection-1.7.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=142819082&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants