Skip to content

[dataprotection] Auto-install k8s-extension for AKS backup#9914

Open
anshulahuja98 wants to merge 4 commits into
Azure:mainfrom
anshulahuja98:feat/dataprotection-auto-install-k8s-extension
Open

[dataprotection] Auto-install k8s-extension for AKS backup#9914
anshulahuja98 wants to merge 4 commits into
Azure:mainfrom
anshulahuja98:feat/dataprotection-auto-install-k8s-extension

Conversation

@anshulahuja98

@anshulahuja98 anshulahuja98 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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

Related command

az dataprotection enable-backup trigger

General Guidelines

  • Have you run azdev style dataprotection 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.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 3, 2026

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @anshulahuja98,
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

yonzhan commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

k8s

@anshulahuja98 anshulahuja98 marked this pull request as ready for review June 4, 2026 04:44
Copilot AI review requested due to automatic review settings June 4, 2026 04:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Bumps the dataprotection package version and improves AKS backup enablement by ensuring the required k8s-extension Azure CLI extension is available (prompting or auto-installing when --yes is used).

Changes:

  • Bump version to 1.11.2 and add release note.
  • Add _ensure_k8s_extension() and wire yes through the AKS backup enablement flow.
  • Move prompting import to module scope and handle non-interactive sessions.

Reviewed changes

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

File Description
src/dataprotection/setup.py Updates package version to 1.11.2.
src/dataprotection/azext_dataprotection/manual/aks/aks_helper.py Adds logic to ensure/install k8s-extension and threads yes through AKS backup setup.
src/dataprotection/HISTORY.rst Documents the new auto-install behavior in release notes.

Comment thread src/dataprotection/azext_dataprotection/manual/aks/aks_helper.py
Comment thread src/dataprotection/azext_dataprotection/manual/aks/aks_helper.py Outdated
Comment thread src/dataprotection/azext_dataprotection/manual/aks/aks_helper.py Outdated
@anshulahuja98

Copy link
Copy Markdown
Contributor Author

@FumingZhang can you please review the PR?

@FumingZhang

Copy link
Copy Markdown
Member

Hi @anshulahuja98, I'm not the owner of dataprotection module

@FumingZhang FumingZhang removed their request for review June 9, 2026 05:37
Comment thread src/dataprotection/azext_dataprotection/manual/aks/aks_helper.py
@Miraj50

Miraj50 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Gave a minor comment. The PR looks good to me.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants