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
I am experiencing an issue with parallel unit testing with Helm. I have a number of tests the use function helm.RenderTemplate. As I can see from the source code, it subsequently calls RunHelmCommandAndGetOutputE(t, &Options{}, "dependency", "build", chartDir). While this is a very helpful functionality, I have a feeling that there's no need to run helm dependencies update before each test. That slowdowns the overall execution time, but also causes issues with parallel tests.
For example, in my case I start getting the following:
=== CONT TestDeploymentRenderPort
template.go:21:
Error Trace: $HOME/test/unittests/template.go:21
$HOME/test/unittests/deployment_render_test.go:42
Error: Received unexpected error:
error while running command: exit status 1; Error: could not download https://charts.bitnami.com/bitnami/redis-16.8.7.tgz: open ../../service-chart/tmpcharts/redis-16.8.7.tgz93759796: no such file or directory
Test: TestDeploymentRenderPort
It seems that helm is deleting tmpcharts directory after helm dependency build command ran. I would like to hear your thoughts on this issue.
If anything, I am willing to contribute to make RunHelmCommandAndGetOutputE(t, &Options{}, "dependency", "build", chartDir) optional for example.
The text was updated successfully, but these errors were encountered:
Hi,
was considered in each test copying of chart directory to temporary a folder(files.CopyFolderToTemp()) and executing there helm commands?
Making optional dependency building may introduce dependencies in tests execution
@denis256 how is this fixing the issue? You will still run helm dependency build each and every time, you shouldn't be making that decision for your users in first place, I ended up just copying a bunch of code from terratest and writing a wraper myself that only builds dependencies once in TestMain. Having a simple flag for that in Options would be ideal, I'd be more than willing to add a PR with that If you would put a green light on it
Even more strange is that the helm.Install workflow does not do ANY dep build; the user must do this before installing (typically for an integration test). It is counterintuitive to have the Template workflow forcibly do the helm dep build vs. the Install workflow not doing it. My preferred solution would be to have the Template workflow omit the dep build and I suggest the user be instructed to do the dep build before any Template workflow as it is with the Install workflow.
To whom it may concern,
I am experiencing an issue with parallel unit testing with Helm. I have a number of tests the use function
helm.RenderTemplate
. As I can see from the source code, it subsequently callsRunHelmCommandAndGetOutputE(t, &Options{}, "dependency", "build", chartDir)
. While this is a very helpful functionality, I have a feeling that there's no need to runhelm dependencies update
before each test. That slowdowns the overall execution time, but also causes issues with parallel tests.For example, in my case I start getting the following:
It seems that helm is deleting
tmpcharts
directory afterhelm dependency build
command ran. I would like to hear your thoughts on this issue.If anything, I am willing to contribute to make
RunHelmCommandAndGetOutputE(t, &Options{}, "dependency", "build", chartDir)
optional for example.The text was updated successfully, but these errors were encountered: