helm / chart-releaser

Hosting Helm Charts via GitHub Pages and Releases
Apache License 2.0
681 stars 112 forks source link

422 Validation Failed when uploading new version #101

Open Alon-Katz opened 3 years ago

Alon-Katz commented 3 years ago

Hey,

Thanks for a great package, but I have a small issue. The first time I uploaded my helm chart everything worked well, cr upload and then cr index did the job.

But now, when I am trying to upload a new version I keep getting:

422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]

Tried increasing the version and the appVersion in Chart.yaml but still keep getting the same error. What am I doing wrong?

Thanks!

Alon-Katz commented 3 years ago

Found the problem, the .deploy folder contained previous deployments and it tried to take them, after manually deleting them it worked, but maybe there is a better way to do this? like making the cr upload look for the latest version in the .deploy folder?

krol3 commented 3 years ago

Validation Failed when uploading the same version to the helm chart repository.

cr upload -o GITHUB_OWNER -r helm-charts  --token XXXXXX -p .cr-release-packages
Error: error creating GitHub release: POST https://api.github.com/repos/GITHUB_OWNER/helm-charts/releases: 422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]
Usage:
  cr upload [flags]

Flags:
  -c, --commit string                  Target commit for release
  -b, --git-base-url string            GitHub Base URL (only needed for private GitHub) (default "https://api.github.com/")
  -r, --git-repo string                GitHub repository
  -u, --git-upload-url string          GitHub Upload URL (only needed for private GitHub) (default "https://uploads.github.com/")
  -h, --help                           help for upload
  -o, --owner string                   GitHub username or organization
  -p, --package-path string            Path to directory with chart packages (default ".cr-release-packages")
      --release-name-template string   Go template for computing release names, using chart metadata (default "{{ .Name }}-{{ .Version }}")
  -t, --token string                   GitHub Auth Token
tylerauerbeck commented 3 years ago

Sounds like this is probably resolved by #111 ? The --skip-existing flag now allows you to skip existing releases if they already exist.