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
YAML to JSON error fixed by cleaning local repository #3111
Comments
Hi @drewwells What versions of Helm and k8s are you running? Also does this occur for any chart after n number of installs or just this chart? |
foolishly, I deleted my broken ~/.helm. I will get back to you on any chart failing or just this one. |
This happens for any chart that you attempt to package after the local repo is corrupted
Same line number on every error message. I've kept the broken repo this time, for further debugging (but can't share it) |
I've been seeing this error from time to time as well. It's really annoying when it happens in CI jobs. Never thought to delete the .helm directory before packaging. Could be a workaround...
|
At this point I run |
We just saw this exact same issue today and it was indeed resolved by removing
Our build is configured to reuse some contents of the workspace, so we also added this sanity check:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Still a problem as of helm v2.11.0. |
I managed to reproduce the bug. It appears that too many concurrent Here is the sample go code that I use to reproduce: package main
import (
"flag"
"fmt"
"log"
"os"
"os/exec"
"sync"
)
var (
nbConcurrentProcesses int
)
func init() {
flag.IntVar(&nbConcurrentProcesses, "n", 10, "nb concurrent processes")
flag.Parse()
}
func main() {
wg := sync.WaitGroup{}
for i:= 0; i < nbConcurrentProcesses; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
runHelmPackage(i)
}(i)
}
wg.Wait()
}
func runHelmPackage(i int) {
output, err := os.Create(fmt.Sprintf("output_process_%v.txt", i))
exitOnError(err)
defer output.Close()
// helm package /tmp/cerebro
cmd := exec.Command("helm", "package", "/tmp/cerebro")
cmd.Stdout = output
cmd.Stderr = output
if err := cmd.Run(); err != nil {
fmt.Printf("failed to run helm install: %v\n", err)
return
}
fmt.Println("it's all good baby")
}
func exitOnError(err error) {
if err == nil {
return
}
log.Fatal(err.Error())
}
|
For me this happens with some regularity when running 17 concurrent helm package invocations. I'm also working around #2258 by retrying failed calls up to 2 times (for a total of 3), so the actual number might be higher. This bug was last triggered in my CI today, with helm version 2.12.3 on Linux. |
In my case, we're triggering 8 According to the debug log:
All We have other pipeline steps to upload helm charts to a centralized repo, so I'm adding This workaround is running for days, so far so good. |
Thanks for the hint @evisong. |
I haven't seen any movement from the community to try and fix this issue, so I'm closing this as inactive. |
We have an issue that 1 in 10-20 charts will fail with
YAML to JSON
error. This chart does not change, it is just being packaged with a new name. The only known workaround is to wipe the local cache andhelm init
. This error appears to be independent of the current path being packaged. Removing all the templates still results in thisYAML to JSON
error occurringThe text was updated successfully, but these errors were encountered: