helm: Overly Verbose Output When Encountering Old Charts With Invalid Semvers
When I do helm repo update, it dumps ~5000 lines saying:
index.go:339: skipping loading invalid entry for chart [chart name] [version] from [repo]: validation: chart.metadata.version [version] is invalid
A bunch of old charts in the repo have a semver with a branch name slapped on. For build reproduction (which would use the at-the-time version of helm) I can’t remove those charts.
Currently, I’m neither using the chart nor using the version but am using the repo. I’d like to suppress this error message as it is causing some issues (flooding the terminal with 5000 lines takes some time and makes build logs ugly). I could do helm repo update 2>&1 | grep -v "skipping loading invalid" as a workaround but this suppression seems like something that should be in the codebase as a flag or the default.
I briefly looked in the docs and could not find a flag or configuration to suppress this message.
I read https://github.com/helm/helm/issues/9342#issuecomment-775269042 to understand the logic of why the thing is invalid. I agree with it. I’m not asking for it to be recognized as valid, only seeing if we can suppress the log message.
I thought about adding this as a comment to https://github.com/helm/helm/issues/9356. It is the same underlying issue but a different use case; I don’t care that I can’t use the chart because I’m not using the chart.
If one of the maintainers think this is a good idea, I could look into doing the (hopefully short) work myself.
Output of helm version:
version.BuildInfo{Version:“v3.5.2”, GitCommit:“167aac70832d3a384f65f9745335e9fb40169dc2”, GitTreeState:“dirty”, GoVersion:“go1.15.7”}
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 27
- Comments: 34 (3 by maintainers)
Commits related to this issue
- feat(helm): optionally hide validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` the new flag `--hide-validation-warnings` will suppress... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): optionally hide validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` the new flag `--hide-validation-warnings` will suppress... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): consolidate validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` during validation of repository, invalid charts are counted... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): consolidate validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` during validation of repository, invalid charts are counted... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): consolidate validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` during validation of repository, invalid charts are counted... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): consolidate validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` during validation of repository, invalid charts are counted... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
- feat(helm): consolidate validation warnings when doing the following commands: * `helm repo add` * `helm repo update` * `helm search repo` during validation of repository, invalid charts are counted... — committed to rcousineau-xandr/helm by rcousineau-xandr 3 years ago
Seconded. This is spamming my console and build logs on every single helm dependency update.
I also don’t see the value in this message, what am I supposed to do about invalid versions in charts of the stable repo that I haven’t even written?
I can see there are pull requests to this issue. No activity on those since half a year though. While this doesn’t seem like a critical priority item, it would be nice to see some resources allocated to it.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
I believe my pull request https://github.com/helm/helm/pull/9611 addresses these concerns in a very reasonable way without totally eliminating the errors. It’s been open for about 3 months and has had zero feedback.
@justinmchase It is not blocked. The advice is to change the logic of the flag for Helm 3 (to maintain backwards compatibility) and then in Helm 4 it can be the default output if agreed by the community.
the classic wait 18 months then request changes
The trouble @hajovonta on the PR is that the code is done but getting the attention of a maintainer has failed (we’ve tried a few times).
@mattfarina is there any chance of seeing this fixed?
I likewise have this issue being required to use an internal repository mirror with invalid packages installed that I don’t care to ever use and have no ability to ever clean up the repo.
For me, I just defined the following function in my
~/.zshrc:Update the absolute path in the function.
If using bash, use
~/.bashrcand${PIPESTATUS[0]}instead. The effect is that stderr will go to stdout, but the return pipestatus does preserve the exit code at least in case you use helm in scripts where you want to check if it failed.A similar annoyance occurs for
helm repo add.@hickeyma Beautiful, I misunderstood. That is a completely reasonable request.
@justinmchase my PR #9611 is over a year old, but it has an approved review now. I’m hoping they will merge it at some point.
The errors you’re seeing are one line per invalid version per chart in your helm repository, regardless of what action you may have been trying to perform.
The PR reduces it to a one line summary with a count of the number of validation errors. It can be expanded to show every error (the current behavior) with a flag.