Skip to content

fix(ci): stop helm release PRs from piling up and going stale#42209

Open
rusackas wants to merge 3 commits into
apache:masterfrom
rusackas:fix/helm-release-single-pr
Open

fix(ci): stop helm release PRs from piling up and going stale#42209
rusackas wants to merge 3 commits into
apache:masterfrom
rusackas:fix/helm-release-single-pr

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

The "Helm: release charts" workflow cuts a new helm-publish-<sha> branch from gh-pages on every helm-touching push to master, and opens a fresh PR each time. Since these PRs are merged manually (by design), they accumulate — and the moment gh-pages moves, the older ones conflict on index.yaml (adjacent version entries plus the generated: timestamp) and have to be hunted down and closed as superseded. Of the last 15 of these PRs, 10 were closed unmerged that way (e.g. #42207, #41692, #41501, #41384, #41345, #41291, #41134).

This changes the workflow to use a single fixed helm-publish branch, force-recreated from the tip of gh-pages on every run:

  • There is exactly one evergreen release PR at any time. Each run refreshes it in place instead of spawning a sibling.
  • Since chart-releaser rebuilds index.yaml from all published GitHub releases, the branch always carries every chart released since the last merge (this is the same consolidation behavior we already saw in Helm chart release for helm-publish-de390f2 #41167), so nothing is lost when runs happen back-to-back.
  • The branch is always freshly cut from origin/gh-pages, so the PR can never go stale or conflict.
  • The PR-open step now reuses an existing open PR for the branch instead of failing with a 422.
  • A concurrency group serializes runs so two quick pushes can't race on force-pushing the shared branch mid-release.

The manual review-and-merge step is intentionally unchanged.

Not addressed here (not fixable in-repo): the Netlify docs-preview checks fail on these gh-pages-based PRs because that branch has no docs site to build. That's a Netlify site setting (limit deploy previews to PRs targeting master) — worth flipping in the Netlify UI, but it's cosmetic noise, not what kills the PRs.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A (CI workflow change)

TESTING INSTRUCTIONS

  1. Merge a change under helm/ (or workflow_dispatch the workflow).
  2. Confirm a helm-publish branch is force-created from gh-pages and a single "Helm chart release" PR opens against gh-pages.
  3. Trigger the workflow again before merging that PR; confirm the same PR is refreshed (no new PR, run logs "Reusing existing pull request").
  4. Merge the PR; the next run recreates the branch and opens a new PR.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

The helm release workflow cut a new helm-publish-<sha> branch from
gh-pages on every helm-touching push, opening a fresh PR each time.
Because these PRs are merged manually, they accumulated; as soon as
gh-pages moved, the older ones conflicted on index.yaml and had to be
closed by hand as superseded (10 of the last 15 died this way).

Use a single fixed helm-publish branch instead, force-recreated from
the tip of gh-pages on every run. chart-releaser rebuilds index.yaml
from all published GitHub releases, so the one evergreen PR always
carries every chart released since the last merge and can never
conflict. The PR step now reuses an open PR for the branch rather than
failing with a 422, and a concurrency group serializes runs so they
don't race on the shared branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bito-code-review

bito-code-review Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Files Excluded

Bito didn't auto-review this change because all changed files are in the exclusion list for automatic reviews. No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the excluded files settings here, or contact your Bito workspace admin at evan@preset.io.

claude added 2 commits July 18, 2026 16:39
Sweeps any still-open per-SHA helm-publish-* PRs from the previous
scheme after reusing or creating the evergreen PR, commenting with a
pointer to the PR that now carries all unreleased charts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… exists

A helm/** push without a Chart.yaml version bump repackages the
already-released version, and cr upload aborts on the existing tag
(422 already_exists), skipping the index rebuild and PR step entirely
(seen on master run 29662544903). Pass skip_existing so the upload is
skipped and the run proceeds to refresh the index and release PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy:helm github_actions Pull requests that update GitHub Actions code size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants