helm / chart-releaser

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

go install: cannot load embed: malformed module path #201

Open michas2 opened 2 years ago

michas2 commented 2 years ago

The Readme is missing a clear example what subcommands should be issued in which order.

I went to a folder containing a single helm release and did cr package which created .cr-release-package fine.

When I do cr upload later I get:

Error: error creating GitHub release burp-suite-enterprise-edition-2022.7.0: failed to upload release asset: /home/michas/flux/eks-charts/charts/burp-suite-enterprise-edition/.cr-release-packages/burp-suite-enterprise-edition-2022.7.0.tgz
: POST https://github.vodafone.com/api/uploads/repos/VFDE-Solstice-Systemintegration/eks-charts/releases/41955/assets?name=burp-suite-enterprise-edition-2022.7.0.tgz: 422  []

The server seems to answer 422 without any reason. 😐

Uploading artifacts manually using curl works fine.

Unfortunately I don't have access to the server logs. Also I am not aware of any debug output available in cr.

Therefore I tried to build from source to add some debug output myself.

I followed the instruction in the Readme and cloned the source. However the install step fails:

$ go install ./...
build github.com/helm/chart-releaser/cr: cannot load embed: malformed module path "embed": missing dot in first path element

I'm not using go a lot, so maybe there is an easy solution, but I was expecting the instructions in the Readme to work out of the box.

Are you able to helm me with the install, or even with the 422/debug?

michas2 commented 2 years ago

I now got access to the server logs. Looks like the cr tool is trying to push the artifact 3 times. The first time the server creates the artifact and returns 201, but then the tool will try to upload the same artifact 2 times more, which will result in a 422, because the artifact is already present.

I also found that my version of go was too old. Therefore I got the "cannot load embed" error. I'm able to debug now. :)