Skip to content

ci: drop push-tags trigger from release-helm-chart workflow#117

Merged
saadqbal merged 3 commits intodevelopfrom
ci/drop-push-tags-trigger
May 7, 2026
Merged

ci: drop push-tags trigger from release-helm-chart workflow#117
saadqbal merged 3 commits intodevelopfrom
ci/drop-push-tags-trigger

Conversation

@saadqbal
Copy link
Copy Markdown
Contributor

@saadqbal saadqbal commented May 7, 2026

Summary

  • Removes the push: tags: ['client-v*', 'v*'] trigger from .github/workflows/release-helm-chart.yaml, keeping only release: types: [published].
  • Eliminates the race between the two parallel runs that gh release create fires (tag push + release published), where the slower run fails with cannot lock ref ... non-fast-forward on the gh-pages push.

Why

gh release create v<x.y.z> is the established release path (see gh release list — every release v1.0.0 through v1.3.2 was created this way). It fires both push (tag) and release (published) events simultaneously, so the workflow ran twice for every release and one of the two consistently failed when racing on gh-pages.

Most recent failure: v1.3.2 cut today (2026-05-07).

Artifacts (client-1.3.2.tgz, updated index.yaml, release asset) landed correctly, but the failed sibling clutters the release page.

The release-asset upload step (if: startsWith(github.ref, 'refs/tags/')) still evaluates true under the release event, since github.ref is the tag ref on a release event — no behaviour change.

Closes #116.

Test plan

  • Next gh release create v<x.y.z> produces exactly one workflow run, with event: release.
  • No failed sibling run on the release page.
  • client-<version>.tgz published to gh-pages, index.yaml updated, and release asset attached as before.

🤖 Generated with Claude Code


Note

Medium Risk
Workflow-only change, but it affects the release pipeline; misconfiguration could cause charts to be packaged from the wrong commit or fail to publish/upload during releases.

Overview
Publishes Helm charts only from release: published events by removing the tag push trigger, avoiding duplicate/racing runs that compete to push updates to gh-pages.

Hardens release-triggered runs by explicitly checking out and uploading assets using github.event.release.tag_name (instead of github.ref), preventing intermittent empty-ref issues that could package or attach charts from the wrong commit.

Reviewed by Cursor Bugbot for commit 4466e0c. Bugbot is set up for automated code reviews on this repo. Configure here.

`gh release create v<x.y.z>` (the established release path per
`gh release list`) fires both `push` (tag) and `release` (published)
events, which causes two parallel workflow runs to race for the
gh-pages push. The slower run fails with non-fast-forward.

Most recent example: v1.3.2 cut today — run 25492826437 (release event)
failed; run 25492826350 (push event) succeeded. Artifacts landed fine,
but the failed sibling shows up as a red X on the release and is noise
for anyone debugging future releases.

Keeping only `release: published` removes the race. The
`Upload chart to GitHub Release (on tag)` step's
`startsWith(github.ref, 'refs/tags/')` guard still evaluates true for
release events (`github.ref` is the tag ref), so the upload step
behaviour is preserved.

Closes #116
@saadqbal saadqbal self-assigned this May 7, 2026
@LukasWodka
Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 11 / 8

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

Comment thread .github/workflows/release-helm-chart.yaml
aptracebloc
aptracebloc previously approved these changes May 7, 2026
With the push-tags trigger removed, the upload step's
`if: startsWith(github.ref, 'refs/tags/')` guard is the only thing
keeping the upload from running, but it silently evaluates to false
when `github.ref` arrives empty — a known intermittent runner bug
(actions/runner#2788, still open as of 2026-05). The same bug also
affects `github.ref_name`, which softprops/action-gh-release@v2 uses
by default to derive the tag, so the action itself can target the
wrong release (or fail) when the bug fires.

Drop the now-redundant `if:` guard (the workflow only runs on
`release: published`, so every run is by definition a release event)
and pass `tag_name` explicitly from the release event payload, which
is unaffected by the bug.
@saadqbal
Copy link
Copy Markdown
Contributor Author

saadqbal commented May 7, 2026

Pushed 12c7a4c addressing review feedback on the previous commit.

The original PR removed the push: tags trigger but left if: startsWith(github.ref, 'refs/tags/') on the release-upload step. That guard relies on github.ref being populated on release events, which is the subject of actions/runner#2788 — a still-open intermittent bug where github.ref (and github.ref_name) arrive empty on release-triggered runs. With the push-tags fallback gone, an empty github.ref would silently skip the upload and ship a release with no .tgz asset.

softprops/action-gh-release@v2 defaults to github.ref_name for the target tag, so the action itself is also vulnerable to the same bug.

Two changes:

  1. Drop the if: startsWith(github.ref, 'refs/tags/') guard. Redundant now that the workflow only triggers on release: published — every run is a release event by construction.
  2. Pass tag_name: ${{ github.event.release.tag_name }} explicitly to the action. The release event payload is unaffected by the runner bug (confirmed in the issue thread comments), so the upload always targets the correct release.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 12c7a4c. Configure here.

Comment thread .github/workflows/release-helm-chart.yaml
actions/checkout@v4 defaults `ref` to github.ref, which is the same
field hit by actions/runner#2788 — the still-open intermittent bug
where github.ref arrives empty on release-triggered runs. Per the
action's docs, when "checking out the repository that triggered a
workflow, this defaults to the reference or SHA for that event.
Otherwise, uses the default branch." So an empty github.ref would
fall back to the repo default branch (develop here), and we'd
package the chart from develop's HEAD instead of the tagged commit.

Pin ref explicitly to github.event.release.tag_name, which is part of
the release event payload and is unaffected by the runner bug.
@saadqbal
Copy link
Copy Markdown
Contributor Author

saadqbal commented May 7, 2026

Pushed 4466e0c addressing the second review note on the checkout step.

Same root cause as the previous fix — actions/checkout@v4 defaults ref to github.ref, so actions/runner#2788 firing during checkout would, per the action's docs, fall back to the repo default branch (develop) and package the chart from develop's HEAD instead of the tagged commit.

Pin ref: ${{ github.event.release.tag_name }} so checkout uses the release event payload, which the runner bug doesn't affect.

After this commit, all three release-event-dependent steps (checkout, gating, asset upload) source the tag from github.event.release.tag_name rather than github.ref / github.ref_name, so a single empty-github.ref incident can no longer corrupt or skip the release.

@saadqbal saadqbal merged commit 578bff9 into develop May 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants