Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyululala committed Oct 28, 2024
1 parent 7878723 commit a59dd9e
Show file tree
Hide file tree
Showing 7 changed files with 5,769 additions and 4,063 deletions.
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release History
===============
upcoming
++++++
* 'az containerapp create': Fix Role assignment error when the default Azure Container Registry could not be found

1.0.0b4
++++++
Expand Down
10 changes: 6 additions & 4 deletions src/containerapp/azext_containerapp/containerapp_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,10 +1042,12 @@ def _construct_app_and_env_for_source_or_repo(self):
if self.get_argument_repo():
_get_registry_details(self.cmd, app, self.get_argument_source()) # fetch ACR creds from arguments registry arguments, --repo will create Github Actions, which requires ACR registry's creds

# After get registry, backfill registry_server, registry_identity
self.set_argument_registry_server(app.registry_server)
self.set_up_system_assigned_identity_as_default_if_using_acr()
self.set_up_registry_identity()
# When the ACR not exists, it will not create acr, it will use local buildpacks or the Cloud Build
# So we should only backfill registry_server, registry_identity when the ACR existing
if app.should_create_acr is False:
self.set_argument_registry_server(app.registry_server)
self.set_up_system_assigned_identity_as_default_if_using_acr()
self.set_up_registry_identity()
return app, env

def post_process(self, r):
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit a59dd9e

Please sign in to comment.