-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
appVersion unmarshalling error - yaml package version issue #290
Comments
@karuppiah7890 thanks for detailed report
This sounds good. Looks like the appVersion as created by helm is still in weird format, but at least it is surrounded by quotes and shouldnt prevent the repo being added. Correct? |
Yes. Repo add will at least work to start with 😄 we can tackle the appVersion scientific notation separately! |
Why same error happens with helm v3.6.0 ? I thought it was repaired about 1 year ago. |
Currently checking go.mod and go.sum shows that internally different yaml packages are being used
go.mod
go.sum
Recently there's been lot of issues around this - helm/helm#6849
I noticed an issue in chartmuseum too. Here's how you can reproduce the issue:
Now, this error is based on the discussions here - helm/helm#6849 . The gist is,
gokpg.yaml.v2
- v2.2.4 here helm/helm@712c90f#diff-37aff102a57d3d7b797f152915a6dc16R62 . We need to use the new one too, for bug fixeshttps://github.com/helm/chartmuseum -> https://github.com/ghodss/yaml -> https://gopkg.in/yaml.v2 -> https://github.com/go-yaml/yaml
Now
https://github.com/go-yaml/yaml
is the main package andgopkg.in/yaml.v2
is just an alias like thing. Everyone else depends on this go-yaml/yaml library underneath. For examplesigs.k8s.io/yaml
too, which is a fork of https://github.com/ghodss/yaml . And these wrapper packages import go-yaml but with lower versions - https://github.com/ghodss/yaml/blob/master/go.mod .My recommendation - just go ahead and use the latest version of gopkg.in/yaml.v2 , which is v2.2.7 , using replace directive in go.mod
This will fix the above given error, but will lead to this kind of index.yaml :
The appVersion becomes a scientific notation and will show up wrong in the helm search and might lead to any issues related to appVersion. You can see here - helm/helm#6921 for more info
The text was updated successfully, but these errors were encountered: