Skip to content

[dataprotection] Add support for AKS backup configuration modification#9452

Merged
evelyn-ys merged 8 commits intoAzure:mainfrom
priyansh17:feature/priyansh/modifyProtectionForAKS
Dec 5, 2025
Merged

[dataprotection] Add support for AKS backup configuration modification#9452
evelyn-ys merged 8 commits intoAzure:mainfrom
priyansh17:feature/priyansh/modifyProtectionForAKS

Conversation

@priyansh17
Copy link
Copy Markdown
Contributor


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

az dataprotection backup-instance update -g "{rg}" --vault-name "{vaultName}" --backup-instance-name "{backupInstanceName}" --backup-configuration "{backupConfig}"

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:

Copilot AI review requested due to automatic review settings December 1, 2025 21:22
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Dec 1, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️dataprotection
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd dataprotection backup-instance update cmd dataprotection backup-instance update added parameter aks_backup_configuration

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Dec 1, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 1, 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
Copy Markdown
Contributor

github-actions bot commented Dec 1, 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
Copy Markdown
Contributor

github-actions bot commented Dec 1, 2025

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Dec 1, 2025
Copy link
Copy Markdown
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 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-configuration parameter to the backup-instance update command 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 objectType values 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

@github-actions github-actions bot removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Dec 1, 2025
Copy link
Copy Markdown
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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Copy link
Copy Markdown
Contributor

@zubairabid zubairabid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, primary review: please rename the parameter name.

@priyansh17 priyansh17 requested a review from zubairabid December 2, 2025 10:10
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Dec 2, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@priyansh17
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 9452 in repo Azure/azure-cli-extensions

@evelyn-ys
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys evelyn-ys merged commit 352e030 into Azure:main Dec 5, 2025
24 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

azclibot commented Dec 5, 2025

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

DhritiJindal27 pushed a commit to DhritiJindal27/azure-cli-extensions that referenced this pull request Dec 18, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Data Protection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants