-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support identity in session update command #8772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @najian, |
|
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>
|
There was a problem hiding this 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_poolsignature to accept identity-related flags. - Implement
set_up_managed_identityandset_up_managed_identity_settingsin the session pool decorator. - Update registry auth configuration to allow
--registry-identityand 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_assignedis inconsistent withget_argument_user_assigned. Rename it touser_assignedto align with the argument parser and decorator methods.
mi_user_assigned=None,
src/containerapp/azext_containerapp/custom.py:3135
- The parameter
mi_system_assignedshould be renamed tosystem_assignedto matchget_argument_system_assignedand 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-identityfor MSI scenarios.
Please provide --registry-server, --registry-username, --registry-password or --registry-identity to update the registry credentials. \n
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 |
|
Hi @najian Release SuggestionsModule: containerapp
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` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks
* Support identity in session update command * update history.rst * fix --------- Co-authored-by: Nan Jiang <[email protected]>
This checklist is used to make sure that common guidelines for a pull request are followed.
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:
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.jsonautomatically.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.