Failure creating a cache rule with Azure CLI v2.70 that doesn't require a credential set
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:
- 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
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].
We are investigating the fix. Workaround is to use previous CLI version or use a credential set.
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.
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.
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.
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.