Skip to content

helm dep up reports "directory not found" for local charts #2887

Closed

Description

@furuholm

I have a helm project with a local subchart mydep listed in requirements.yaml

dependencies:
- name: mydep
  version: 0.1.0
  repository: file://charts/mydep/

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

The issue is present on both Mac and Linux.

Activity

  1. spmason commented on Sep 4, 2017

    @spmason

    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

  2. furuholm commented on Sep 5, 2017

    @furuholm
    Author

    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).

  3. spmason commented on Sep 5, 2017

    @spmason

    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.

  4. jascott1 commented on Sep 5, 2017

    @jascott1
    Contributor

    @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.

  5. furuholm commented on Sep 7, 2017

    @furuholm
    Author

    @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
    
  6. jascott1 commented on Sep 8, 2017

    @jascott1
    Contributor

    @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.

  7. jascott1 commented on Sep 29, 2017

    @jascott1
    Contributor

    @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.

  8. furuholm commented on Sep 30, 2017

    @furuholm
    Author

    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.

  9. jascott1 commented on Oct 2, 2017

    @jascott1
    Contributor

    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.

  10. jascott1 commented on Oct 2, 2017

    @jascott1
    Contributor

    @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!

  11. added a commit that references this issue on Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions