Skip to content

helmfile race condition when using rewriteChartDependencies #2502

Description

@champtar

Operating system

Fedora 43

Helmfile Version

1.4.3

Helm Version

3.20.0

Bug description

helmfile with multiple releases using the same local chart + patches (so chartify), the function rewriteChartDependencies rewrite the local Chart.yaml instead of working on a copy of the chart, and multiple go routines are calling rewriteChartDependencies for the same chart in // -> race condition

This was discovered in #2501, the test uses --concurrency 1 for now

Example helmfile.yaml

https://github.com/champtar/helmfile/blob/4c8e311d82ad98da2f05c63bbbf810a5f91547ca/test/integration/test-cases/chart-deps-condition/input/helmfile.yaml

Error message you've seen (if any)

TEST: chart with dependencies and condition
in test/integration/test-cases/chart-deps-condition/input/helmfile.yaml: [exit status 1

COMMAND:
  helm template --debug=false --output-dir=/tmp/chartify835999929/helmfile-tests/testchartifyinstallfalse/helmx.1.rendered testchartifyinstallfalse /tmp/chartify835999929/helmfile-tests/testchartifyinstallfalse -f /tmp/chartify835999929/helmfile-tests/testchartifyinstallfalse/values.yaml -f /tmp/helmfile120344979/helmfile-tests-testchartifyinstallfalse-values-659d88cbbb --namespace helmfile-tests

OUTPUT:
  Error: validation: chart.metadata.name is required]
FAIL: "helmfile template" shouldn't fail
make: *** [Makefile:54: integration] Error 1

Steps to reproduce

#2501

Working Helmfile Version

none ?

Relevant discussion

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions