acr icon indicating copy to clipboard operation
acr copied to clipboard

Failure creating a cache rule with Azure CLI v2.70 that doesn't require a credential set

Open luisdlp opened this issue 9 months ago • 5 comments

Describe the bug When creating a cache rule that doesn't require a credential set we get the following error:

UnboundLocalError: cannot access local variable 'rg' where it is not associated with a value.

This repros only on the newest Azure CLI version 2.70.

To Reproduce Steps to reproduce the behavior:

  1. az acr cache create -n cacherule01 -r myresourcegroup --source-repo docker.io/repo/hello-world --target-repo dh/hello-world -g afreadportaltest

Expected behavior Cache rule should be created with no error

Screenshots

Image

Any relevant environment information

  • Azure CLI/PowerShell/SDK version: Azure CLI v 2.70

Additional context Add any other context about the problem here.

If any information is a concern to post here, you can create a support ticket or send an email to [email protected].

luisdlp avatar Mar 07 '25 17:03 luisdlp

We are investigating the fix. Workaround is to use previous CLI version or use a credential set.

luisdlp avatar Mar 07 '25 17:03 luisdlp

We have identified the root cause. Will put a fix in soon. The fix should come out in the next az cli release, i.e. 2.71.

renshao avatar Mar 07 '25 19:03 renshao

The fix has been merged into Azure/azure-cli dev branch: https://github.com/Azure/azure-cli/pull/30984

It will be included in the next release of az cli, 2.71.

renshao avatar Mar 11 '25 02:03 renshao

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Aug 08 '25 02:08 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 26 '25 02:10 github-actions[bot]