Skip to content

test - #10492

Closed
Charlie Li (chengliangli0918) wants to merge 1 commit into
Azure:mainfrom
chengliangli0918:main
Closed

test#10492
Charlie Li (chengliangli0918) wants to merge 1 commit into
Azure:mainfrom
chengliangli0918:main

Conversation

@chengliangli0918

@chengliangli0918 Charlie Li (chengliangli0918) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

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 azdev 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.

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@chengliangli0918
Charlie Li (chengliangli0918) marked this pull request as ready for review October 23, 2026 05:17
Copilot AI balanced review requested due to automatic review settings October 23, 2026 05:17

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.

🟡 Changes recommended

Conversion can alter unrelated cluster credentials and cause repeat credential retrievals to fail with merge conflicts.

2 open issues
What changed in this PR

Adds automatic conversion from kubelogin device-code authentication to Azure CLI authentication for AI Manager and namespace credential retrieval.

Changes:

  • Detects device-code kubeconfigs, locates kubelogin, and invokes conversion after merging credentials.
  • Warns when kubelogin is unavailable or conversion fails.
  • Bumps the extension to 2.0.1b3 and documents the behavior.
File Description
src/​aimanager/​setup.py Updates the extension version to 2.0.1b3.
src/​aimanager/​HISTORY.rst Documents automatic authentication conversion.
src/​aimanager/​azext_aimanager/​custom.py Invokes conversion after credential merging.
src/​aimanager/​azext_aimanager/​_helpers.py Adds executable discovery, authentication detection, and conversion helpers.

Review effort: Balanced

Comment on lines +113 to +116
subprocess.run(
[kubelogin_path, "convert-kubeconfig", "-l", "azurecli", "--kubeconfig", path],
check=True,
)
try:
kubeconfig = credential_results.kubeconfigs[0].value.decode(encoding='UTF-8')
print_or_merge_credentials(path, kubeconfig, overwrite_existing, context_name)
convert_kubelogin_devicecode(path, kubeconfig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants