-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid --skip-refresh on local charts #541
Conversation
3628746
to
f33b855
Compare
f33b855
to
abc2923
Compare
@indrekj please rebase your code. then the unit test will be ok. |
abc2923
to
46bb1ce
Compare
@indrekj is there another method that does not add a func arg? |
I did a rebase against origin main but it still fails.
Not sure. I need to know if we're dealing with a local chart and then using that we can skip the refresh. I'm not very familiar with Go. In other languages I would use keyword arguments instead of a boolean argument though. I don't think we can just skip an argument if we want to use this approach though. |
One idea would be to use |
46bb1ce
to
b272566
Compare
@indrekj please try to fix unit test. Thanks very much. |
b919c6c
to
e127f31
Compare
There's still one test failing which I'm having trouble fixing:
That test does not have anything to do with 18080 and istio. So it seems that tests are not being run completely isolated from other tests. I suspect there's some Helm cache lingering and this is causing this issue. Do you have any recommendations on what to do in this case? |
Interesting- But let me rerun the test anyway, assuming it might be a flake. |
Apparently it's not a flake 🤔 |
That is likely. Previously we had |
e127f31
to
2732e04
Compare
bc7d180
to
69efb43
Compare
@indrekj could you rebase main branch? |
I think you already did, at least I don't see any new changes in the main branch. By the way, thank you for taking care of this. I have been swamped, and looking at the code, you did it much better than I would have. |
All the dependencies get correctly installed when dealing with remote charts. If there's a local chart that depends on remote dependencies then those don't get automatically installed. See helmfile#526. They end up with this error: ``` Error: no cached repository for helm-manager-b6cf96b91af4f01317d185adfbe32610179e5246214be9646a52cb0b86032272 found. (try 'helm repo update'): open /root/.cache/helm/repository/helm-manager-b6cf96b91af4f01317d185adfbe32610179e5246214be9646a52cb0b86032272-index.yaml: no such file or directory ``` One workaround for that would be to add the repositories from the local charts. Something like this: ``` cd local-chart/ && helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done ``` This however is not trivial to parse and implement. An easier fix which I did here is just to not allow doing `--skip-refresh` for local repositories. Fixes helmfile#526 Signed-off-by: Indrek Juhkam <indrek@urgas.eu>
69efb43
to
deec255
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the dependencies get correctly installed when dealing with remote charts.
If there's a local chart that depends on remote dependencies then those don't get automatically installed. See #526. They end up with this error:
One workaround for that would be to add the repositories from the local charts. Something like this:
This however is not trivial to parse and implement.
An easier fix which I did here is just to not allow doing
--skip-refresh
for local repositories.Fixes #526