As discussed in https://sweetops.slack.com/archives/CE5NGCB9Q/p1569439225028200
To not break users depend on the existing behavior, I'd add also some command-line flag to turn the existing behavior(=not fail on no repos).
Or should it just emit warning message like No repositories managed hence nothing to be updated by Helmfile. Did you missrepositoriesblock in your helmfile.yaml?, if it helps?
I like the idea of doing a warning message. It's less invasive of a change and still informs the user that the behavior is not intuitive.
If you could give some guidance, I'd like to help implement this
Other candidates for such warning messages:
Unable to update chart dependencies due to that no `repositories` defined in your helmfile.yaml
Nothing to update. Did you miss `repositories` in your helmfile.yaml? See https://github.com/roboll/helmfile/issues/878
Use whatever you like!
If you could give some guidance, I'd like to help implement this
@abatilo That would be super helpful!
I think emitting a warning message when there's no unresolved dependencies(dependencies with known remote charts tied to repositories in your helmfile.yaml) would do the job.
That is, add a if block before the return here: https://github.com/roboll/helmfile/blob/cbf5b8b1e7b4c6de1eed70af5a12955c91638e73/pkg/state/chart_dependency.go#L198
For emitting the warning message, you can use m.logger.Warnf("some msg: arg1=%s, arg2=%s", arg1, arg2) like we already do in https://github.com/roboll/helmfile/blob/cbf5b8b1e7b4c6de1eed70af5a12955c91638e73/pkg/state/chart_dependency.go#L430
As discussed in https://sweetops.slack.com/archives/CE5NGCB9Q/p1569439225028200
To not break users depend on the existing behavior, I'd add also some command-line flag to turn the existing behavior(=not fail on no repos).
Or should it just emit warning message like
No repositories managed hence nothing to be updated by Helmfile. Did you missrepositoriesblock in your helmfile.yaml?, if it helps?
It isn't helpful to those outside the sweetops community to post inaccessible links.
Sorry about that @benmathews
To any future readers, here's a public link to read:
https://archive.sweetops.com/helmfile/#fa85324b-3d8f-4938-9823-a8b760c6d9c4
@benmathews Hey! Please feel free to join the sweetops slack anyway. I'm not affiliated at all but I'd say it's public, welcoming place to discuss anything about Helmfile. Actually that's why I've chosen it as a official Slack channel.
And yeah as @abatilo shared, I find archives automatically published for any sweetops-related slack channels are dope.
Sorry about that @benmathews
To any future readers, here's a public link to read:
https://archive.sweetops.com/helmfile/#fa85324b-3d8f-4938-9823-a8b760c6d9c4
This link doesn't work for me but I found conversation here https://archive.sweetops.com/helmfile/2019/09/#fa85324b-3d8f-4938-9823-a8b760c6d9c4
Problem:
helmfile --selector name=mychart deps
There are no repositories defined in your helmfile.yaml.
This means helmfile cannot update your dependencies or create a lock file.
See https://github.com/roboll/helmfile/issues/878 for more information.
If I run with no selector everything works great. Looks like --selector is filtering out the repositories section. Maybe not allow '--selector' with the deps command?