[BUG REPORT] Any Change to Chart Returns "is not a valid chart directory. Skipping..."
Version of Helm and Kubernetes: helm verison: 3.4.1 kubectl version: 1.19.3 ct version: 3.3.1
I'm following a book (Packt - Learn Helm) and I hit a stopping point when trying to make any change to verify changes done within charts.
I'm expecting it to advise no changes and then when I make a change to the description of the chart, to then return that a change has been made to the chart.
I am instead getting the "is not a valid chart directory. Skipping..."
Here are my exact steps to recreate:
- git clone https://github.com/PacktPublishing/-Learn-Helm Learn-Helm
- cd to project
- ct lint-and-install
- ct lint-and-install returns with "No chart changes detected."
- git checkout -b chart-testing-example to create a separate branch for changes.
- cd to /helm-charts/charts/guestbook
- change chart description from "A Helm chart for Kubernetes" to "Used to deploy the Guestbook application" and save
- ct lint-and-install returns "Directory 'helm-charts\charts\guestbook' is not a valid chart directory. Skipping..." and "No chart changes detected."
If you then ctrl+z back to original file and save, it will then work and advise "No chart changes detected." I thought maybe it's the format it's saving as. I am saving as UTF-8 and carriage return as CRLF.
NOTE: I am running Windows 10. I have tried from notepad, notepad++, and Visual Code. All return the same results.
ALSO NOTE: I am a total newbie at Helm charts and just trying to learn. It may be something simple that I am missing that the book was unclear of.
I appreciate any assistance.
ct by default looks for a charts/ subdirectory containing all your charts.
try running it from the helm-charts/ directory.
@smlx , thanks for the response. I did move to charts/ and tried the same and it did not work. Please note that I have a ct.yaml in the root that has the following values:
**chart-dirs:
- helm-charts/charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
validate-maintainers: false**
I am finding that if I match the chart to the one in the Git repo, it works even if I modified it back to it's original values. Any change that is different than the chart in the Git repo then returns not a valid chart.
i digged into same problem. on windows git bash result is
$ ct list-changed
...
Directory 'charts\rocketchat' is not a valid chart directory. Skipping...
...
on wsl2 (ubuntu in windows) result is
$ ct list-changed
charts/rocketchat
i am not able to fix code in go but i looked around code an at https://github.com/helm/chart-testing/blob/e84e88cf8bd04ac91000fd675d4cfc2ddf69ba96/pkg/chart/chart.go#L720
there is a fix / for path seperator. this has to be os-specific (\ on windows) i think
i also find other points with '/' what is not working in windows environemt.
Hey all, it's officially been over a year. Is there any update to resolving this issue on Windows machines?
Is it only Windows related? I'm on Fedora and gets the same error. Wired thing is that below command works fine
ct lint --lint-conf lintconf.yaml --config ct.yaml --chart-yaml-schema chart_schema.yaml --chart-dirs . --charts .
but when I remove --charts argument, it throws is not a valid chart directory. Skipping...
I'm testing with ct 3.5.1
still an issue
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Can we get this reopened if it's not resolved? I feel like this is an important issue to handle for different OS's.
any update on this?