You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
helm dep up reports "directory not found" for local charts #2887
The following error is reported when I run helm dep up in Helm 1.6.0
Hang tight while we grab the latest from your chart repositories...
...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):
Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: getsockopt: connection refused
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Save error occurred: directory /Users/tobias/proj/charts/mydep not found
Deleting newly downloaded charts, restoring pre-update state
Error: directory /Users/tobias/proj/charts/mydep not found
Note that the directory /Users/tobias/proj/charts/mydep does indeed exist
The same command works in Helm 1.5.1 though:
Hang tight while we grab the latest from your chart repositories...
...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):
Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: getsockopt: connection refused
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Deleting outdated charts
Saving 1 charts
I just came across this and it seems like helm doesn't like the referenced chart living in the same charts/ folder that it's eventually going to place the tarball in
If I instead move my charts to a helm-charts/folder then local repositories work for me again
edit: I should add that I think Helm should handle this better. If the old behaviour is no longer supported then it should produce a better error that points people toward the correct solution
Reacted by Varun Elavia, Attila Csoma, Kai, Quin, Sushanth Kille, Previn Kumar, sananibrahimov-finocomp, Miro, William Gan and Alex Berenshtein
Agree that this should either be considered a bug or a better message is warranted as this is a breaking change for those putting the charts in the charts directory (which to me seems reasonable).
I'd like to weigh in with how, as a newcomer to helm, I intuitively expected this to work.
Basically I expected my own charts in charts/<chart_name> folders to be ignored, because they're folders and thus implicitly "user managed". Then any dependencies in requirements.yaml get added as tarballs in the root of charts/ by the usual helm dependency commands.
How it seems to work instead is that helm expects to explicitly manage everything inside charts/, to the point where it actively deletes any of my folders inside charts/ when I helm dependency update. The first time this happened I was quite surprised and very thankful for source-control!
Hopefully this will help guide contributors on the proper solution to this problem, or perhaps there are very valid reasons the reasons why it can't work the way I expected.
@furuholm You listed Helm 1.6.0 but I assume you mean 2.6.0. We just released version 2.6.1 which fixes dependency deleting. Would you be able to test 2.6.1 to see if it solves your issue? If not we can continue to troubleshoot. Thanks.
@jascott1 You are right about the version, I meant 2.6.0. But it does not seem that 2.6.1 solves my problem. I still get:
Save error occurred: directory /Users/tobias/proj/charts/mydep not found
Deleting newly downloaded charts, restoring pre-update state
Error: directory /Users/tobias/proj/charts/mydep not found
@furuholm I have confirmed this is a bug with relative charts. LoadFiles is not seeing the base filenames for the relative charts when it does the comparison to build the chart struct. I will keep looking at it and submit a PR. Sorry about the trouble but thanks for reporting this.
Reacted by Tobias Furuholm, yuzhipeng, Miro and Cloudscape Germany
@furuholm Just realized I was seeing a separate issue with file:// paths and conflated it with yours (sorry about that). requirements.yaml specifies the source for the chart, so Im not sure that it makes sense to have source and destination (charts/) be the same.
I think it’s perfectly resonable to disallow charts as the source directory. But I also think it is reasonable to assume that many users will put them there when starting using relative charts. I think a better error message is the way to go.
Reacted by Peter Baumgartner, Pavel Dmytrenko, Charles Gagnon and Alik Khilazhev
I agree an error for that situation would be an improvement. Its confusing because you can just put charts into charts/ dir and not use requirements.yaml and that works.
Activity
spmason commentedon Sep 4, 2017
I just came across this and it seems like helm doesn't like the referenced chart living in the same
charts/folder that it's eventually going to place the tarball inIf I instead move my charts to a
helm-charts/folder then local repositories work for me againedit: I should add that I think Helm should handle this better. If the old behaviour is no longer supported then it should produce a better error that points people toward the correct solution
furuholm commentedon Sep 5, 2017
I've verified your findings @spmason. Thanks!
Agree that this should either be considered a bug or a better message is warranted as this is a breaking change for those putting the charts in the charts directory (which to me seems reasonable).
spmason commentedon Sep 5, 2017
I'd like to weigh in with how, as a newcomer to helm, I intuitively expected this to work.
Basically I expected my own charts in
charts/<chart_name>folders to be ignored, because they're folders and thus implicitly "user managed". Then any dependencies inrequirements.yamlget added as tarballs in the root ofcharts/by the usualhelm dependencycommands.How it seems to work instead is that helm expects to explicitly manage everything inside
charts/, to the point where it actively deletes any of my folders insidecharts/when Ihelm dependency update. The first time this happened I was quite surprised and very thankful for source-control!Hopefully this will help guide contributors on the proper solution to this problem, or perhaps there are very valid reasons the reasons why it can't work the way I expected.
jascott1 commentedon Sep 5, 2017
@furuholm You listed Helm 1.6.0 but I assume you mean 2.6.0. We just released version 2.6.1 which fixes dependency deleting. Would you be able to test 2.6.1 to see if it solves your issue? If not we can continue to troubleshoot. Thanks.
@spmason The deleted charts issue was fixed in the latest Helm release v2.6.1 as you can see in the Changelog.
https://github.com/kubernetes/helm/releases/tag/v2.6.1
Please give that a try and let us know if you have any problems.
furuholm commentedon Sep 7, 2017
@jascott1 You are right about the version, I meant 2.6.0. But it does not seem that 2.6.1 solves my problem. I still get:
jascott1 commentedon Sep 8, 2017
@furuholm I have confirmed this is a bug with relative charts. LoadFiles is not seeing the base filenames for the relative charts when it does the comparison to build the chart struct. I will keep looking at it and submit a PR. Sorry about the trouble but thanks for reporting this.
jascott1 commentedon Sep 29, 2017
@furuholm Just realized I was seeing a separate issue with
file://paths and conflated it with yours (sorry about that).requirements.yamlspecifies the source for the chart, so Im not sure that it makes sense to have source and destination (charts/) be the same.furuholm commentedon Sep 30, 2017
I think it’s perfectly resonable to disallow charts as the source directory. But I also think it is reasonable to assume that many users will put them there when starting using relative charts. I think a better error message is the way to go.
jascott1 commentedon Oct 2, 2017
I agree an error for that situation would be an improvement. Its confusing because you can just put charts into charts/ dir and not use requirements.yaml and that works.
jascott1 commentedon Oct 2, 2017
@furuholm Im going to close this since we understand the problem but please open an issue for a better error if you feel strongly about it. Thanks!
Add an inheritance example.