Repository navigation
fix(list): avoid deadlock in helmfile list with more than 100 states - #2773
Merged
Merged
Conversation
max06
requested review from
aditmeno,
itscaro,
mumoshu,
xiaomudk,
yxxhero and
zhaque44
as code owners
September 7, 2026 12:11
yxxhero
force-pushed
the
fix/list-deadlock-many-states
branch
from
September 7, 2026 14:09
82de19b to
afae9af
Compare
yxxhero
approved these changes
Sep 7, 2026
yxxhero
force-pushed
the
fix/list-deadlock-many-states
branch
from
September 10, 2026 00:42
afae9af to
44b2ef4
Compare
… than 100 states ListReleases gathered per-state results through a channel with a fixed buffer of 100 that was drained only after ForEachState had visited every state. The 101st state carrying releases therefore blocked on the send forever: `helmfile list` hung with no output and ignored SIGTERM. Append to the result slice under a mutex instead. ForEachState may run the callback concurrently, and the existing sort keeps the output order deterministic, so nothing else changes. Adds TestListWithManyStates (101 helmfile.d states, fails fast on a hang). Resolves helmfile#2772 Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Florian Müller <[email protected]>
yxxhero
force-pushed
the
fix/list-deadlock-many-states
branch
from
September 10, 2026 23:13
44b2ef4 to
1044c57
Compare
1 task
hbjydev
pushed a commit
to hbjydev/phoebe
that referenced
this pull request
Sep 14, 2026
…601) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [aqua:helmfile/helmfile](https://github.com/helmfile/helmfile) | tools | minor | `1.7.4` → `1.8.0` | --- ### Release Notes <details> <summary>helmfile/helmfile (aqua:helmfile/helmfile)</summary> ### [`v1.8.0`](https://github.com/helmfile/helmfile/releases/tag/v1.8.0) [Compare Source](helmfile/helmfile@v1.7.4...v1.8.0) #### What's Changed - build(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2749](helmfile/helmfile#2749) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.36 to 1.32.37 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2750](helmfile/helmfile#2750) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.1 to 1.107.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2751](helmfile/helmfile#2751) - build(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2752](helmfile/helmfile#2752) - docs: fix broken star history chart by [@​Dessalines39394](https://github.com/Dessalines39394) in [#​2742](helmfile/helmfile#2742) - build(deps): bump github.com/mattn/go-runewidth from 0.0.27 to 0.0.28 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2753](helmfile/helmfile#2753) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.37 to 1.32.38 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2755](helmfile/helmfile#2755) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.2 to 1.107.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2756](helmfile/helmfile#2756) - build(deps): bump helm-diff to v3.15.12 by [@​yxxhero](https://github.com/yxxhero) in [#​2759](helmfile/helmfile#2759) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.38 to 1.33.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2762](helmfile/helmfile#2762) - build(deps): bump github.com/gofrs/flock from 0.13.0 to 0.13.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2761](helmfile/helmfile#2761) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.3 to 1.109.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2760](helmfile/helmfile#2760) - build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2763](helmfile/helmfile#2763) - feat: allow helmfile to continue on failed releases by [@​ceriath](https://github.com/ceriath) in [#​2616](helmfile/helmfile#2616) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.109.1 to 1.110.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2764](helmfile/helmfile#2764) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.1 to 1.33.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2765](helmfile/helmfile#2765) - fix: resolve OCI version constraints before deriving the shared chart cache path by [@​samifruit514](https://github.com/samifruit514) in [#​2768](helmfile/helmfile#2768) - feat: opt-in OpenTelemetry tracing and metrics (experimental) by [@​yxxhero](https://github.com/yxxhero) in [#​2769](helmfile/helmfile#2769) - build(deps): bump go.opentelemetry.io/otel from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2778](helmfile/helmfile#2778) - build(deps): bump github.com/mattn/go-runewidth from 0.0.28 to 0.0.29 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2776](helmfile/helmfile#2776) - build(deps): bump go.opentelemetry.io/otel/sdk/metric from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2777](helmfile/helmfile#2777) - build(deps): bump go.opentelemetry.io/proto/otlp from 1.10.0 to 1.11.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2774](helmfile/helmfile#2774) - build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.46.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2775](helmfile/helmfile#2775) - build(deps): bump gitpython from 3.1.58 to 3.1.59 in /docs by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2785](helmfile/helmfile#2785) - build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2784](helmfile/helmfile#2784) - build(deps): bump google.golang.org/protobuf from 1.36.12-0.20260120151049-f2248ac996af to 1.36.12 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2783](helmfile/helmfile#2783) - build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2782](helmfile/helmfile#2782) - build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.2 to 1.33.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2781](helmfile/helmfile#2781) - build(deps): bump go.opentelemetry.io/contrib/exporters/autoexport from 0.67.0 to 0.71.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2780](helmfile/helmfile#2780) - build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.110.0 to 1.111.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​2779](helmfile/helmfile#2779) - fix(list): avoid deadlock in `helmfile list` with more than 100 states by [@​max06](https://github.com/max06) in [#​2773](helmfile/helmfile#2773) - chore: bump Helm to v3.22.0 and v4.3.0 by [@​yxxhero](https://github.com/yxxhero) in [#​2786](helmfile/helmfile#2786) - build(deps): bump helm-diff to v3.15.13 by [@​yxxhero](https://github.com/yxxhero) in [#​2788](helmfile/helmfile#2788) - feat(remote): support wildcards in remote values/secrets file selectors by [@​hoppla20](https://github.com/hoppla20) in [#​2787](helmfile/helmfile#2787) - build(deps): bump helmfile/vals from v0.46.0 to v0.46.1 by [@​yxxhero](https://github.com/yxxhero) in [#​2789](helmfile/helmfile#2789) #### New Contributors - [@​Dessalines39394](https://github.com/Dessalines39394) made their first contribution in [#​2742](helmfile/helmfile#2742) - [@​samifruit514](https://github.com/samifruit514) made their first contribution in [#​2768](helmfile/helmfile#2768) - [@​max06](https://github.com/max06) made their first contribution in [#​2773](helmfile/helmfile#2773) - [@​hoppla20](https://github.com/hoppla20) made their first contribution in [#​2787](helmfile/helmfile#2787) **Full Changelog**: <helmfile/helmfile@v1.7.4...v1.8.0> </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:eyJjcmVhdGVkSW5WZXIiOiI0NC43OS42IiwidXBkYXRlZEluVmVyIjoiNDQuODMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9taW5vciJdfQ==--> Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/601
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
helmfile 1.8.0 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/stretchr/testify from 1.11.1 to 1.12.0 by @dependabot[bot] in helmfile/helmfile#2749 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.36 to 1.32.37 by @dependabot[bot] in helmfile/helmfile#2750 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.1 to 1.107.2 by @dependabot[bot] in helmfile/helmfile#2751 * build(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by @dependabot[bot] in helmfile/helmfile#2752 * docs: fix broken star history chart by @Dessalines39394 in helmfile/helmfile#2742 * build(deps): bump github.com/mattn/go-runewidth from 0.0.27 to 0.0.28 by @dependabot[bot] in helmfile/helmfile#2753 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.37 to 1.32.38 by @dependabot[bot] in helmfile/helmfile#2755 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.2 to 1.107.3 by @dependabot[bot] in helmfile/helmfile#2756 * build(deps): bump helm-diff to v3.15.12 by @yxxhero in helmfile/helmfile#2759 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.32.38 to 1.33.1 by @dependabot[bot] in helmfile/helmfile#2762 * build(deps): bump github.com/gofrs/flock from 0.13.0 to 0.13.1 by @dependabot[bot] in helmfile/helmfile#2761 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.107.3 to 1.109.1 by @dependabot[bot] in helmfile/helmfile#2760 * build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 by @dependabot[bot] in helmfile/helmfile#2763 * feat: allow helmfile to continue on failed releases by @ceriath in helmfile/helmfile#2616 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.109.1 to 1.110.0 by @dependabot[bot] in helmfile/helmfile#2764 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.1 to 1.33.2 by @dependabot[bot] in helmfile/helmfile#2765 * fix: resolve OCI version constraints before deriving the shared chart cache path by @samifruit514 in helmfile/helmfile#2768 * feat: opt-in OpenTelemetry tracing and metrics (experimental) by @yxxhero in helmfile/helmfile#2769 * build(deps): bump go.opentelemetry.io/otel from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2778 * build(deps): bump github.com/mattn/go-runewidth from 0.0.28 to 0.0.29 by @dependabot[bot] in helmfile/helmfile#2776 * build(deps): bump go.opentelemetry.io/otel/sdk/metric from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2777 * build(deps): bump go.opentelemetry.io/proto/otlp from 1.10.0 to 1.11.0 by @dependabot[bot] in helmfile/helmfile#2774 * build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.46.0 by @dependabot[bot] in helmfile/helmfile#2775 * build(deps): bump gitpython from 3.1.58 to 3.1.59 in /docs by @dependabot[bot] in helmfile/helmfile#2785 * build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 by @dependabot[bot] in helmfile/helmfile#2784 * build(deps): bump google.golang.org/protobuf from 1.36.12-0.20260120151049-f2248ac996af to 1.36.12 by @dependabot[bot] in helmfile/helmfile#2783 * build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0 by @dependabot[bot] in helmfile/helmfile#2782 * build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.2 to 1.33.3 by @dependabot[bot] in helmfile/helmfile#2781 * build(deps): bump go.opentelemetry.io/contrib/exporters/autoexport from 0.67.0 to 0.71.0 by @dependabot[bot] in helmfile/helmfile#2780 * build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.110.0 to 1.111.0 by @dependabot[bot] in helmfile/helmfile#2779 * fix(list): avoid deadlock in `helmfile list` with more than 100 states by @max06 in helmfile/helmfile#2773 * chore: bump Helm to v3.22.0 and v4.3.0 by @yxxhero in helmfile/helmfile#2786 * build(deps): bump helm-diff to v3.15.13 by @yxxhero in helmfile/helmfile#2788 * feat(remote): support wildcards in remote values/secrets file selectors by @hoppla20 in helmfile/helmfile#2787 * build(deps): bump helmfile/vals from v0.46.0 to v0.46.1 by @yxxhero in helmfile/helmfile#2789 ## New Contributors * @Dessalines39394 made their first contribution in helmfile/helmfile#2742 * @samifruit514 made their first contribution in helmfile/helmfile#2768 * @max06 made their first contribution in helmfile/helmfile#2773 * @hoppla20 made their first contribution in helmfile/helmfile#2787 **Full Changelog**: https://github.com/helmfile/helmfile/compare/v1.7.4...v1.8.0</pre> <p>View the full release notes at <a href="https://github.com/helmfile/helmfile/releases/tag/v1.8.0">https://github.com/helmfile/helmfile/releases/tag/v1.8.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!20121
max06
added a commit
to max06/atlas
that referenced
this pull request
Oct 12, 2026
…on lookups (#81) - **CI matrix** (`tests.yml`): adds helm `v4.3.0` and helmfile `v1.8.1`, so every supported minor is tested with its latest patch release, plus `latest`. - **Authenticated version lookups** (`tests.yml`, `test-actions.yml`): the `api.github.com` calls that resolve `latest` send the workflow token. Unauthenticated, they hit the rate limit (HTTP 403) and the job failed with an empty version (seen twice on #78). - **Action images**: atlas-render → helm 4.3.0, helmfile 1.8.1, sops 3.13.3, yq 4.54.1, kustomize 5.8.3; atlas-diff → yq 4.54.1. ## Verification A/B render of a repository with 264 deployments (1830 files), old against new tool versions: - helm/helmfile/sops/yq: formatting only (blank lines, one trailing space, one leading `---`); the parsed YAML is identical. - kustomize 5.6.0 → 5.8.3: the `namespace` field is no longer set on the cluster-scoped `ValidatingAdmissionPolicy` and `ValidatingAdmissionPolicyBinding` of the gateway-api install. Everything else is identical. helmfile 1.8.1 includes the fix for the `helmfile list` deadlock with more than 100 states (helmfile/helmfile#2773); its own image ships helm 4.3.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Resolves #2772
What
ListReleasescollected per-state results throughmake(chan []*HelmRelease, 100)and only drained the channel afterForEachStatereturned. With more than 100 states carrying releases the 101st send blocked forever, sohelmfile listhung with no output (and ignored SIGTERM).This PR appends to the result slice under a mutex instead.
ForEachStatemay invoke the callback concurrently, and the existingsort.Slicealready makes the output order deterministic, so the output is unchanged.Test
TestListWithManyStatesbuilds 101helmfile.dstates with one release each and lists them with a 60 s guard, so a regression fails fast instead of hanging until thego testtimeout. Against the previous code the test fails withListReleases did not return within 60s for 101 states: deadlock while collecting releases; with this changego test ./pkg/app/ -run TestListpasses.Written by Claude (Anthropic's Claude Code) on behalf of @max06; DCO sign-off by the human author.