azure-cli: Az acr helm push - You have tried to upload a chart that already exists

Describe the bug From time to time (a few times a day) once we do helm push to container registry: az acr helm push --name ${{parameters.containerRegistry}} $(Build.ArtifactStagingDirectory)/${{parameters.imageRepository}}-$(Build.BuildNumber).tgz --force

we receive Error: You have tried to upload a chart that already exists. Correlation ID: 65237304-9a53-4ff4-93a3-0f59441f35ef. event though there is no way to exists. We checked it by: az acr helm list -n ${{parameters.containerRegistry}} --query "ebox[?version=='$(Build.BuildNumber)']" and it returns 0 rows.

Issue comes and goes - once we retry a build it usally passes without issues. I assue that root cause of this exception is somewhere else (connectivity issues, parallel pushes of other charts to the same repository?). Keep in mind that we use --force that should allow us to push chart even if it indeed existed.

To Reproduce Run many times: az acr helm push --name ${{parameters.containerRegistry}} $(Build.ArtifactStagingDirectory)/${{parameters.imageRepository}}-$(Build.BuildNumber).tgz --force

Expected behavior Helm chart pushed without issues

Environment summary

  • Azure DevOps build pipeline.
  • VMSS agents with custom image
  • Azure cli version:

azure-cli 2.7.0 * ommand-modules-nspkg 2.0.3 core 2.7.0 * nspkg 3.0.4 telemetry 1.0.4 *

Extensions: azure-devops 0.18.0 azure-cli-iot-ext 0.8.9

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

I’m facing this issue as well even with --force flag Error: You have tried to upload a chart that already exists. Correlation ID: b11fbaaa-0033-4756-9521-8fca29c24f9a.