Repository navigation
fix: remove partially extracted chart when helm pull fails - #2805
Merged
yxxhero merged 2 commits intoSep 23, 2026
Merged
Conversation
schmidtjohannes
requested review from
aditmeno,
itscaro,
mumoshu,
xiaomudk,
yxxhero and
zhaque44
as code owners
September 22, 2026 19:57
`helm pull --untar` extracts in place, so a failed fetch can leave a partial chart in the cache. forcedDownloadChart returns the error but does not remove the directory. Chart.yaml is the first entry in a chart archive, so the leftover is often a complete Chart.yaml and nothing else. findChartDirectory accepts any directory that contains a Chart.yaml, so the next run adopts the leftover as a valid cache entry and helm renders zero manifests while exiting 0. With --skip-refresh, or anywhere below the shared cache dir where isSharedCachePath suppresses refresh, that state persists for the life of the cache. Remove the directory on the fetch error path so a failed download cannot be mistaken for a cached chart. Co-Authored-By: Claude <[email protected]> Signed-off-by: Johannes Schmidt <[email protected]>
schmidtjohannes
force-pushed
the
fix/remove-partial-chart-download
branch
from
September 22, 2026 19:59
e8a1ab5 to
13ced58
Compare
Member
|
@schmidtjohannes please fix CI. |
…nize The lint job runs 'go fix -diff ./...' (make check-modernize), which rewrites the composite literal in TestForcedDownloadChart_RemovesPartialDownloadOnFetchError to use the embedded-field shorthand for ReleaseSetSpec. Apply the rewrite so CI passes. Signed-off-by: yxxhero <[email protected]>
yxxhero
approved these changes
Sep 23, 2026
yxxhero
left a comment
Member
There was a problem hiding this comment.
LGTM. The fix removes the partially extracted chart while still holding the exclusive chart lock, so it can't race with concurrent readers, and it matches the existing removal semantics of the refresh path in acquireChartLock. CI is green after the modernize fix. Thanks!
hbjydev
pushed a commit
to hbjydev/phoebe
that referenced
this pull request
Oct 5, 2026
…#829) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [aqua:helmfile/helmfile](https://github.com/helmfile/helmfile) | tools | patch | `1.8.0` → `1.8.1` | --- ### Release Notes <details> <summary>helmfile/helmfile (aqua:helmfile/helmfile)</summary> ### [`v1.8.1`](https://github.com/helmfile/helmfile/releases/tag/v1.8.1) [Compare Source](helmfile/helmfile@v1.8.0...v1.8.1) #### What's Changed - feat: add HELMFILE\_DISABLE\_VALS env var to skip vals processing by [@​jimmyR](https://github.com/jimmyR) in [#​2471](helmfile/helmfile#2471) - build(deps): bump github.com/mattn/go-runewidth from 0.0.29 to 0.0.30 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2796](helmfile/helmfile#2796) - build(deps): bump golang.org/x/term from 0.45.0 to 0.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2795](helmfile/helmfile#2795) - build(deps): bump github.com/sashabaranov/go-openai from 1.42.0 to 1.42.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2792](helmfile/helmfile#2792) - fix: cancel kubedog-tracked helm subprocesses on SIGINT/SIGTERM by [@​vulragrag-star](https://github.com/vulragrag-star) in [#​2791](helmfile/helmfile#2791) - build(deps): bump github.com/hashicorp/go-getter/v2 from 2.2.3 to 2.2.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2793](helmfile/helmfile#2793) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.3 to 1.33.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2794](helmfile/helmfile#2794) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.111.0 to 1.113.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2797](helmfile/helmfile#2797) - build: update Go to 1.27.1 and modernize the codebase by [@​yxxhero](https://github.com/yxxhero) in [#​2798](helmfile/helmfile#2798) - build(deps): bump github.com/helmfile/chartify from 0.28.2 to 0.29.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2803](helmfile/helmfile#2803) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.4 to 1.33.5 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2801](helmfile/helmfile#2801) - build(deps): bump github.com/hashicorp/hcl/v2 from 2.24.0 to 2.25.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2802](helmfile/helmfile#2802) - feat: add per-release continue-on-error support by [@​Tsukoyachi](https://github.com/Tsukoyachi) in [#​2804](helmfile/helmfile#2804) - fix: remove partially extracted chart when helm pull fails by [@​schmidtjohannes](https://github.com/schmidtjohannes) in [#​2805](helmfile/helmfile#2805) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.113.1 to 1.113.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2808](helmfile/helmfile#2808) - build(deps): bump github.com/helmfile/vals from 0.46.1 to 0.47.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2806](helmfile/helmfile#2806) - ci: publish a signed packslip with each release by [@​jdx](https://github.com/jdx) in [#​2809](helmfile/helmfile#2809) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.113.2 to 1.113.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2811](helmfile/helmfile#2811) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.5 to 1.33.6 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2810](helmfile/helmfile#2810) - add --track-logs-interval flag by [@​pznamensky](https://github.com/pznamensky) in [#​2807](helmfile/helmfile#2807) - fix: drop leading dot from release condition error message by [@​Cayan](https://github.com/Cayan) in [#​2812](helmfile/helmfile#2812) #### New Contributors - [@​jimmyR](https://github.com/jimmyR) made their first contribution in [#​2471](helmfile/helmfile#2471) - [@​vulragrag-star](https://github.com/vulragrag-star) made their first contribution in [#​2791](helmfile/helmfile#2791) - [@​Tsukoyachi](https://github.com/Tsukoyachi) made their first contribution in [#​2804](helmfile/helmfile#2804) - [@​schmidtjohannes](https://github.com/schmidtjohannes) made their first contribution in [#​2805](helmfile/helmfile#2805) - [@​jdx](https://github.com/jdx) made their first contribution in [#​2809](helmfile/helmfile#2809) - [@​pznamensky](https://github.com/pznamensky) made their first contribution in [#​2807](helmfile/helmfile#2807) - [@​Cayan](https://github.com/Cayan) made their first contribution in [#​2812](helmfile/helmfile#2812) **Full Changelog**: <helmfile/helmfile@v1.8.0...v1.8.1> </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/London) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/829
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
helm pull --untarextracts in place, so a failed fetch can leave a partial chart in the cache.forcedDownloadChartreturns the error but never removes the directory.Chart.yamlis the first entry in a chart archive, so the leftover is often a completeChart.yamland nothing else.findChartDirectoryaccepts any directory containing aChart.yaml, so the next run adopts it as a valid cache entry — and helm renders zero manifests and exits 0. With--skip-refresh, or anywhere below the shared cache dir whereisSharedCachePathsuppresses refresh, that state persists for the life of the cache.Observed on an ArgoCD repo-server running helmfile as a CMP plugin. Two charts on the same pod left partial downloads: one had a truncated
Chart.yamland failed loudly (Error: validation: chart.metadata.name is required), the other had a completeChart.yamland rendered silently empty. The consumer read the empty render as "this path declares nothing".Fix:
os.RemoveAll(chartPath)on the fetch error path, so a failed download cannot be mistaken for a cached chart.Test:
TestForcedDownloadChart_RemovesPartialDownloadOnFetchErrormocks aFetchthat writesChart.yamland then errors, and assertsfindChartDirectoryrejects whatever remains. It fails onmainwithout the change.🤖 Generated with Claude Code