Skip to content

[Container Apps] Fix Azure/azure-cli-extensions#10016: az containerapp job create: Fix registry identity auth for ACR sovereign cloud domains#10017

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32194-fix-containerapp-registry-auth
Draft

[Container Apps] Fix Azure/azure-cli-extensions#10016: az containerapp job create: Fix registry identity auth for ACR sovereign cloud domains#10017
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-32194-fix-containerapp-registry-auth

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

--registry-identity auth was rejected for *.azurecr.us (US Gov) and *.azurecr.cn (Azure China) ACR domains because all registry domain checks hardcoded .azurecr.io only.

Changes

  • _constants.py: Added ACR_IMAGE_SUFFIXES = [".azurecr.io", ".azurecr.us", ".azurecr.cn"]
  • _utils_validation.py: Added is_acr_registry(server) — checks all three ACR sovereign cloud domains
  • _utils.py: Re-exports is_acr_registry for consumers already importing from _utils
  • _validators.py: Replaced ACR_IMAGE_SUFFIX not in (registry_server or "") with not is_acr_registry(registry_server) in validate_create — this was the direct error path
  • containerapp_decorator.py, containerapp_job_decorator.py, containerapp_job_registry_decorator.py, custom.py, _up_utils.py: Replaced all ACR_IMAGE_SUFFIX in/not in server checks with is_acr_registry(); also fixed rindex(ACR_IMAGE_SUFFIX) calls in _up_utils.py that would ValueError for non-.io domains
  • tests/latest/test_containerapp_validator_unit.py: Unit tests covering .azurecr.io, .azurecr.us, .azurecr.cn, and non-ACR registries

Before / After

# Before — fails on US Gov tenant
az containerapp job create \
  --registry-server myregistry.azurecr.us \
  --registry-identity system ...
# ERROR: --registry-identity: expected an ACR registry (*.azurecr.io) for --registry-server

# After — all sovereign cloud ACR domains accepted
az containerapp job create \
  --registry-server myregistry.azurecr.us \
  --registry-identity system ...  # succeeds

Related command

az containerapp create, az containerapp update, az containerapp job create, az containerapp registry set

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? (azdev required; see .azure-pipelines/templates/azdev_setup.yml for the install command until azdev==0.2.11b1 is on PyPI)
  • 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 22, 2026

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

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @copilot,
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.

…zurecr.us, azurecr.cn) for managed identity auth
Copilot AI changed the title [WIP] Fix az containerapp job create registry auth for azurecr.us [Container Apps] Fix Azure/azure-cli-extensions#10016: az containerapp job create: Fix registry identity auth for ACR sovereign cloud domains Jun 22, 2026
Copilot AI requested a review from a0x1ab June 22, 2026 22:34
@yonzhan

yonzhan commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Container Apps

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants