Skip to content

Conversation

@najian
Copy link
Member

@najian najian commented May 20, 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 May 20, 2025 10:00
@najian najian requested review from Juliehzl and howang-ms as code owners May 20, 2025 10:00
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

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

Hi @najian,
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 May 20, 2025

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

@github-actions
Copy link

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>

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 managed identity in the az containerapp sessionpool update command by introducing new parameters and handling logic for system- and user-assigned identities, as well as registry identity.

  • Extend update_session_pool signature to accept identity-related flags.
  • Implement set_up_managed_identity and set_up_managed_identity_settings in the session pool decorator.
  • Update registry auth configuration to allow --registry-identity and reflect it in change detection.

Reviewed Changes

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

File Description
src/containerapp/azext_containerapp/custom.py Updated update_session_pool signature to include identity flags.
src/containerapp/azext_containerapp/containerapp_sessionpool_decorator.py Added managed identity setup methods; enhanced registry auth logic.
Comments suppressed due to low confidence (3)

src/containerapp/azext_containerapp/custom.py:3133

  • The parameter name mi_user_assigned is inconsistent with get_argument_user_assigned. Rename it to user_assigned to align with the argument parser and decorator methods.
mi_user_assigned=None,

src/containerapp/azext_containerapp/custom.py:3135

  • The parameter mi_system_assigned should be renamed to system_assigned to match get_argument_system_assigned and maintain consistency with other flags.
mi_system_assigned=False):

src/containerapp/azext_containerapp/containerapp_sessionpool_decorator.py:550

  • [nitpick] Consider clarifying this error message to explicitly list the required flags (--registry-server, --registry-username, --registry-password, --registry-identity) and provide an example of using --registry-identity for MSI scenarios.
Please provide --registry-server, --registry-username, --registry-password or --registry-identity to update the registry credentials. \n

@github-actions
Copy link

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

Hi @najian

Release Suggestions

Module: containerapp

  • Update VERSION to 1.1.0b6 in src/containerapp/setup.py

Notes

* 'az containerapp env create': Set identity only when `--mi-system-assigned` or `--mi-user-assigned` is specified.
* 'az containerapp env create': Set identity only when `--system-assigned` or `--user-assigned` is specified.
* 'az containerapp up': Support deploying Azure AI Foundry model to Container App with `--model-registry`, `--model-name`, `--model-version`.
* 'az containerapp sessionpool update': Support `--mi-system-assigned`, `--mi-user-assigned` and `--registry-identity`
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between parameters --registry-identity with --mi-system-assigned and --mi-user-assigned?

Copy link
Member Author

Choose a reason for hiding this comment

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

--registry-identity is for pull-image from ACR registry
--mi-system-assigned and --mi-user-assigned are used by container, to call other azure service
In API view, --mi-system-assigned and --mi-user-assigned need set to managedIdentity lifecycle.
--registry-identity is inside the registry credentials

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks

@zhoxing-ms zhoxing-ms merged commit b6f0d2c into Azure:main May 22, 2025
9 checks passed
bavneetsingh16 pushed a commit to AzureArcForKubernetes/k8s-extension that referenced this pull request May 23, 2025
* Support identity in session update command

* update history.rst

* fix

---------

Co-authored-by: Nan Jiang <[email protected]>
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