Repository navigation
fix(#2741): prefetch shared remote charts instead of serializing sync - #2743
Merged
yxxhero merged 3 commits intoAug 15, 2026
Merged
Conversation
toms-place
requested review from
aditmeno,
itscaro,
mumoshu,
xiaomudk,
yxxhero and
zhaque44
as code owners
August 13, 2026 12:58
Member
|
@toms-place please fix DCO |
toms-place
force-pushed
the
fix/2741-prefetch-shared-remote-charts
branch
from
August 13, 2026 13:03
91c32c9 to
3836886
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Prefetches shared remote charts to restore concurrent sync/apply/diff operations while retaining download locking.
Changes:
- Adds shared-chart detection and prefetching.
- Aligns fetch acquisition flags with upgrade flags.
- Adds state and application regression tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/state/state.go |
Implements prefetch eligibility, flags, and preparation. |
pkg/state/state_test.go |
Tests chart fetch flags. |
pkg/state/issue_2741_test.go |
Tests prefetching and concurrency. |
pkg/app/app.go |
Enables prefetching for diff, sync, and apply. |
pkg/app/issue_2741_test.go |
Tests application-level diff wiring. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…/diff (helmfile#2741) PR helmfile#2662 fixed a Windows chart-download race (helmfile#768) by wrapping the entire helm upgrade/diff operation in a per-chart+version lock, not just the download. Since sync/apply/diff never set ForceDownload, releases sharing a remote chart end up fully serialized even at high --concurrency. Add ChartPrepareOptions.PrefetchSharedRemoteCharts: PrepareCharts groups selected releases by chart+version, and force-downloads (once) any chart used by 2+ releases that also resolve to identical acquisition flags (--verify/--keyring/--plain-http/--insecure-skip-tls-verify/--devel) and to a configured repository (or OCI ref) - not a bare \"dir/chart\"-shaped local path. That materializes release.ChartPath, which lets withChartOperationLock's existing ChartPath != \"\" guard skip the lock, restoring concurrency without touching the helmfile#768 protection for charts that aren't prefetched. Also add chartFetchFlags to give forcedDownloadChart's \`helm fetch\` the same verify/keyring/TLS flags flagsForUpgrade already applies, closing a parity gap that predates this change (affects lint/unittest/pull too). Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: Thomas Hanser <[email protected]>
toms-place
force-pushed
the
fix/2741-prefetch-shared-remote-charts
branch
from
August 13, 2026 13:50
62af2be to
2e59136
Compare
… use NUL-delimited flag signature Copilot review on helmfile#2741's PR flagged two issues in the shared-chart prefetch added there: 1. forcedDownloadChart untars a shared chart into a local directory, but flagsForUpgrade unconditionally re-adds --verify for the later `helm upgrade` regardless of ChartPath. Helm's VerifyChart only accepts a packaged .tgz/provenance pair, not an unpacked directory, so upgrading a prefetched chart with verify enabled would fail. Exclude --verify from prefetch eligibility entirely rather than trying to suppress the later flag - those releases just keep the pre-existing serialized-lock behavior, unaffected by this feature. 2. The per-key flag-agreement signature joined flags with a space, which isn't injective: a keyring path containing a space and a flag-like token could collide with a different keyring plus a real flag, silently deduplicating releases with different acquisition settings. Join with NUL instead, which can't appear in an OS argument. Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: Thomas Hanser <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
pkg/state/state.go:2303
- Grouping uses the original chart even though
prepareChartForReleaselater replaces it withOverrideChart. For shared original charts,--chart /path/chart.tgzis therefore marked for forced download and passed tohelm fetch, whereas the previous flow handed the valid local archive directly to upgrade/diff. Apply the override before computing eligibility and cache keys (this also correctly groups distinct originals overridden to one remote chart).
for i := range releases {
release := &releases[i]
key := st.getChartCacheKey(release)
Copilot flagged that PrepareCharts grouped releases by release.Chart before prepareChartForRelease applied st.OverrideChart (the -chart CLI flag), so distinct original charts that all resolve to the same overridden chart were never recognized as shared and missed the prefetch. Apply the override once upfront, before the grouping loop reads release.Chart. Co-Authored-By: Claude Sonnet 5 <[email protected]> Signed-off-by: Thomas Hanser <[email protected]>
yxxhero
approved these changes
Aug 15, 2026
hbjydev
pushed a commit
to hbjydev/phoebe
that referenced
this pull request
Aug 27, 2026
…278) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [aqua:helmfile/helmfile](https://github.com/helmfile/helmfile) | tools | patch | `1.7.0` → `1.7.4` | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/141) for more information. --- ### Release Notes <details> <summary>helmfile/helmfile (aqua:helmfile/helmfile)</summary> ### [`v1.7.4`](https://github.com/helmfile/helmfile/releases/tag/v1.7.4) [Compare Source](helmfile/helmfile@v1.7.3...v1.7.4) #### What's Changed - build(deps): bump github.com/sashabaranov/go-openai from 1.41.2 to 1.42.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2735](helmfile/helmfile#2735) - build(deps): bump gitpython from 3.1.57 to 3.1.58 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2737](helmfile/helmfile#2737) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.3 to 1.106.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2736](helmfile/helmfile#2736) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.4 to 1.107.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2740](helmfile/helmfile#2740) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.34 to 1.32.35 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2739](helmfile/helmfile#2739) - fix([#​2741](helmfile/helmfile#2741)): prefetch shared remote charts instead of serializing sync by [@​toms-place](https://github.com/toms-place) in [#​2743](helmfile/helmfile#2743) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.0 to 1.107.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2744](helmfile/helmfile#2744) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.35 to 1.32.36 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2745](helmfile/helmfile#2745) - Bumping Helm versions to 3.21.4 and 4.2.4 by [@​yxxhero](https://github.com/yxxhero) with [@​Copilot](https://github.com/Copilot) in [#​2746](helmfile/helmfile#2746) - refactor: drop empty-render workaround now that chartify handles it natively by [@​yxxhero](https://github.com/yxxhero) in [#​2747](helmfile/helmfile#2747) #### New Contributors - [@​toms-place](https://github.com/toms-place) made their first contribution in [#​2743](helmfile/helmfile#2743) **Full Changelog**: <helmfile/helmfile@v1.7.3...v1.7.4> ### [`v1.7.3`](https://github.com/helmfile/helmfile/releases/tag/v1.7.3) [Compare Source](helmfile/helmfile@v1.7.2...v1.7.3) #### What's Changed - build(deps): bump docker/login-action from 4 to 4.5.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2723](helmfile/helmfile#2723) - fix: skip chartification when chart renders zero resources by [@​ankit090701](https://github.com/ankit090701) in [#​2724](helmfile/helmfile#2724) - feat: add --skip-diff-validation-on-install CLI flag by [@​henrichter-sap](https://github.com/henrichter-sap) in [#​2728](helmfile/helmfile#2728) - bump helm-diff to v3.15.11 by [@​yxxhero](https://github.com/yxxhero) with [@​Copilot](https://github.com/Copilot) in [#​2725](helmfile/helmfile#2725) - fix: update helm plugins via uninstall+reinstall to honor pinned version by [@​yxxhero](https://github.com/yxxhero) in [#​2727](helmfile/helmfile#2727) - build(deps): bump docker/login-action from 4.5.2 to 4.6.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2729](helmfile/helmfile#2729) - build(deps): bump gitpython from 3.1.54 to 3.1.57 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2730](helmfile/helmfile#2730) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.2 to 1.106.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2731](helmfile/helmfile#2731) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.31 to 1.32.34 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2732](helmfile/helmfile#2732) - build(deps): bump github.com/helmfile/chartify from v0.28.0 to v0.28.1 by [@​yxxhero](https://github.com/yxxhero) in [#​2733](helmfile/helmfile#2733) #### New Contributors - [@​ankit090701](https://github.com/ankit090701) made their first contribution in [#​2724](helmfile/helmfile#2724) - [@​henrichter-sap](https://github.com/henrichter-sap) made their first contribution in [#​2728](helmfile/helmfile#2728) **Full Changelog**: <helmfile/helmfile@v1.7.2...v1.7.3> ### [`v1.7.2`](https://github.com/helmfile/helmfile/releases/tag/v1.7.2) [Compare Source](helmfile/helmfile@v1.7.1...v1.7.2) #### What's Changed - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.105.1 to 1.105.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2707](helmfile/helmfile#2707) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.30 to 1.32.31 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2708](helmfile/helmfile#2708) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.105.2 to 1.106.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2709](helmfile/helmfile#2709) - build(deps): bump google.golang.org/grpc from 1.82.0 to 1.82.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2711](helmfile/helmfile#2711) - build(deps): bump gitpython from 3.1.50 to 3.1.52 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2710](helmfile/helmfile#2710) - feat: add --repo-retries for helm repo and registry login commands by [@​yxxhero](https://github.com/yxxhero) in [#​2683](helmfile/helmfile#2683) - build(deps): bump github.com/helmfile/vals from 0.44.5 to 0.45.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2713](helmfile/helmfile#2713) - build(deps): bump github.com/mattn/go-runewidth from 0.0.24 to 0.0.27 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2714](helmfile/helmfile#2714) - build(deps): bump gitpython from 3.1.52 to 3.1.54 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2715](helmfile/helmfile#2715) - build(deps): bump go.yaml.in/yaml/v3 from 3.0.4 to 3.0.5 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2716](helmfile/helmfile#2716) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.0 to 1.106.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2719](helmfile/helmfile#2719) - feat: support Helm 4 --rollback-on-failure alongside deprecated --atomic by [@​yxxhero](https://github.com/yxxhero) in [#​2722](helmfile/helmfile#2722) **Full Changelog**: <helmfile/helmfile@v1.7.1...v1.7.2> ### [`v1.7.1`](https://github.com/helmfile/helmfile/releases/tag/v1.7.1) [Compare Source](helmfile/helmfile@v1.7.0...v1.7.1) #### What's Changed - build(deps): bump github.com/zclconf/go-cty from 1.18.1 to 1.19.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2692](helmfile/helmfile#2692) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.27 to 1.32.28 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2693](helmfile/helmfile#2693) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.104.2 to 1.105.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2694](helmfile/helmfile#2694) - build(deps): bump golang.org/x/sync from 0.21.0 to 0.22.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2695](helmfile/helmfile#2695) - build(deps): bump golang.org/x/term from 0.44.0 to 0.45.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2696](helmfile/helmfile#2696) - chore: bump helm to v4.2.3 and v3.21.3 by [@​yxxhero](https://github.com/yxxhero) in [#​2699](helmfile/helmfile#2699) - feat: center section divider to match table width by [@​yxxhero](https://github.com/yxxhero) in [#​2698](helmfile/helmfile#2698) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.28 to 1.32.29 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2697](helmfile/helmfile#2697) - build(deps): bump github.com/mattn/go-runewidth from 0.0.19 to 0.0.24 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2700](helmfile/helmfile#2700) - docs: add OCI auth troubleshooting by [@​dashitongzhi](https://github.com/dashitongzhi) in [#​2679](helmfile/helmfile#2679) - fix: ensure OCI registry login when SkipRepos is set by [@​yxxhero](https://github.com/yxxhero) in [#​2701](helmfile/helmfile#2701) - build(deps): bump github.com/helmfile/chartify from 0.27.0 to 0.28.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2702](helmfile/helmfile#2702) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.105.0 to 1.105.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2703](helmfile/helmfile#2703) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.29 to 1.32.30 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2704](helmfile/helmfile#2704) - feat: support disabling hooks by [@​fabiobaiao](https://github.com/fabiobaiao) in [#​2691](helmfile/helmfile#2691) - build(deps): bump github.com/helmfile/vals from 0.44.4 to 0.44.5 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2706](helmfile/helmfile#2706) - build(deps): bump actions/setup-go from 6 to 7 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2705](helmfile/helmfile#2705) - feat: support disabling insecure template functions only by [@​fabiobaiao](https://github.com/fabiobaiao) in [#​2689](helmfile/helmfile#2689) #### New Contributors - [@​dashitongzhi](https://github.com/dashitongzhi) made their first contribution in [#​2679](helmfile/helmfile#2679) - [@​fabiobaiao](https://github.com/fabiobaiao) made their first contribution in [#​2691](helmfile/helmfile#2691) **Full Changelog**: <helmfile/helmfile@v1.7.0...v1.7.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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjAuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjQ2LjUiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInR5cGUvcGF0Y2giXX0=--> Reviewed-on: https://forgejo.hayden.moe/hayden/phoebe/pulls/278
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
helmfile 1.7.4 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * build(deps): bump github.com/sashabaranov/go-openai from 1.41.2 to 1.42.0 by @dependabot[bot] in helmfile/helmfile#2735 * build(deps): bump gitpython from 3.1.57 to 3.1.58 in /docs by @dependabot[bot] in helmfile/helmfile#2737 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.3 to 1.106.4 by @dependabot[bot] in helmfile/helmfile#2736 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.106.4 to 1.107.0 by @dependabot[bot] in helmfile/helmfile#2740 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.34 to 1.32.35 by @dependabot[bot] in helmfile/helmfile#2739 * fix(#2741): prefetch shared remote charts instead of serializing sync by @toms-place in helmfile/helmfile#2743 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.0 to 1.107.1 by @dependabot[bot] in helmfile/helmfile#2744 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.35 to 1.32.36 by @dependabot[bot] in helmfile/helmfile#2745 * Bumping Helm versions to 3.21.4 and 4.2.4 by @yxxhero with @Copilot in helmfile/helmfile#2746 * refactor: drop empty-render workaround now that chartify handles it natively by @yxxhero in helmfile/helmfile#2747 ## New Contributors * @toms-place made their first contribution in helmfile/helmfile#2743 **Full Changelog**: https://github.com/helmfile/helmfile/compare/v1.7.3...v1.7.4</pre> <p>View the full release notes at <a href="https://github.com/helmfile/helmfile/releases/tag/v1.7.4">https://github.com/helmfile/helmfile/releases/tag/v1.7.4</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!16697
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.
This PR resolves #2741.
PR #2662 fixed a Windows chart-download race (#768) by wrapping the entire helm upgrade/diff operation in a per-chart+version lock, not just the download. Since sync/apply/diff never set ForceDownload, releases sharing a remote chart end up fully serialized even at high --concurrency.
Add ChartPrepareOptions.PrefetchSharedRemoteCharts: PrepareCharts groups selected releases by chart+version, and force-downloads (once) any chart used by 2+ releases that also resolve to identical acquisition flags (--verify/--keyring/--plain-http/--insecure-skip-tls-verify/--devel) and to a configured repository (or OCI ref) - not a bare "dir/chart"-shaped local path. That materializes release.ChartPath, which lets withChartOperationLock's existing ChartPath != "" guard skip the lock, restoring concurrency without touching the #768 protection for charts that aren't prefetched.
Also add chartFetchFlags to give forcedDownloadChart's `helm fetch` the same verify/keyring/TLS flags flagsForUpgrade already applies, closing a parity gap that predates this change (affects lint/unittest/pull too).