[dataprotection] Add support for AKS backup configuration modification#9452
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| dataprotection backup-instance update | cmd dataprotection backup-instance update added parameter aks_backup_configuration |
|
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.
Pull request overview
This PR adds support for modifying AKS (Azure Kubernetes Service) backup configurations in existing backup instances, eliminating the need to recreate backup instances when configuration changes are required.
Key Changes:
- Added
--backup-configurationparameter to thebackup-instance updatecommand for AKS workloads - Implemented datasource-type-specific validation to ensure correct parameters are used for different backup types
- Added helper logic to clean up null
objectTypevalues in resource properties to prevent schema validation errors
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
setup.py |
Incremented extension version from 1.7.1 to 1.7.2 |
HISTORY.rst |
Documented new --backup-configuration parameter and helper fix |
_params.py |
Added backup_configuration parameter definition for the update command |
custom.py |
Implemented datasource-type-specific logic to handle AKS backup configuration updates with validation |
helpers.py |
Added cleanup logic to remove resourceProperties when objectType is null |
test_dataprotection_backup_instance_operations.py |
Added comprehensive live test for AKS configuration modification with state reset |
...otection/azext_dataprotection/tests/latest/test_dataprotection_backup_instance_operations.py
Outdated
Show resolved
Hide resolved
...otection/azext_dataprotection/tests/latest/test_dataprotection_backup_instance_operations.py
Show resolved
Hide resolved
...otection/azext_dataprotection/tests/latest/test_dataprotection_backup_instance_operations.py
Show resolved
Hide resolved
...otection/azext_dataprotection/tests/latest/test_dataprotection_backup_instance_operations.py
Outdated
Show resolved
Hide resolved
...otection/azext_dataprotection/tests/latest/test_dataprotection_backup_instance_operations.py
Outdated
Show resolved
Hide resolved
zubairabid
left a comment
There was a problem hiding this comment.
Looks good, primary review: please rename the parameter name.
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9452 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ dataprotection-1.8.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=145650910&view=results |
Azure#9452) * [Release] Add support for AKS backup configuration modification * [Release] Update version to 1.8.0 and nit fixes * azdev style fixes * Modify AKS backup configuration parameter * Fix typos and improve error messages for AKS backup configuration handling * Refactor AKS backup configuration initialization * Update AKS backup configuration argument options * Update AKS backup instance configuration in tests
This adds support for users to modify data protection backup instances for Azure Kubernetes workloads. Enables users to modify existing backup instances without the need to create new ones for changes required.
Added live unit tests for the same.
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: