flux-check-hook icon indicating copy to clipboard operation
flux-check-hook copied to clipboard

Linting fails with Helm v3.8.2 or later

Open solidDoWant opened this issue 2 years ago • 5 comments

When running the pre-commit hook with a Helm binary v3.8.2 or later (possibly earlier versions as well), the hook will always fail with:

==> Linting *.tgz
Error unable to open tarball: open *.tgz: The filename, directory name, or volume label syntax is incorrect

The problem is ultimately caused by this line, which specifies the chart as *.tgz, rather than f"{quote(chartName)}-{quote(chartVersion)}.tgz".

I'm not familiar enough with Helm artifacts to confirm that f"{quote(chartName)}-{quote(chartVersion)}.tgz" covers every use case, but if somebody else can confirm then I can create a PR to fix the issue.

solidDoWant avatar Jul 17 '22 06:07 solidDoWant

Just checked with the latest helm version and on my end it still works with the *.tgz, so I think this isn't related to the helm version but maybe based on your shell/os.

Independent of this, I think your change makes sense anyway, as it's more explicit/correct, if you can create a PR that would be great

tarioch avatar Jul 18 '22 09:07 tarioch

Opened here: https://github.com/tarioch/flux-check-hook/pull/3

What platform/shell are you using? I'd like to verify the issue for my own sanity

solidDoWant avatar Jul 18 '22 23:07 solidDoWant

Merged, thanks a lot. I'm using bash

tarioch avatar Jul 19 '22 06:07 tarioch

Unfortunately this doesn't work if you have version wildcards. E.g.

helm pull --repo https://docs.renovatebot.com/helm-charts --version 32.x renovate

pulls down a file called renovate-32.118.0.tgz

tarioch avatar Jul 19 '22 06:07 tarioch

I'm reverting this for now

tarioch avatar Jul 19 '22 06:07 tarioch