ci(release): stop wiping latest release assets on .github-only pushes - #184
yaroslavmokflmg wants to merge 1 commit into
Conversation
🦩 Flamingo Code Review2 finding(s) — 1 action required · 1 recommended · 0 informational Mode: advisory · Rules cited: Inline comments: 2 new Need another pass? Commits pushed after this review are not reviewed automatically.
Prefer typing? Comment React 👍/👎 on inline comments to teach the reviewer. Started 2026-09-18 02:35 UTC · updated 2026-09-18 02:35 UTC · workflow run |
| if: >- | ||
| !failure() && !cancelled() && | ||
| (needs.build.result == 'success' || | ||
| needs.build_client.result == 'success' || | ||
| needs.build_helm.result == 'success') |
There was a problem hiding this comment.
🦩 🔴 [error/action_required] MESHAGEN-010-2 Release job now runs on push to main without a workflow_dispatch gate
The release job creates the actual GitHub Release (via gh release ... logic further down) and is triggered by the push event on main (see the on: block, lines 15-20) as well as workflow_dispatch. The PR's change to the if: condition only adds a check on upstream job results (needs.build.result == 'success' etc.) but does not restrict execution to github.event_name == 'workflow_dispatch'. Per rule MESHAGEN-010-2, GitHub Release creation must only be triggered by workflow_dispatch, never by push alone — this rule explicitly warns against automatic releases on push. Combined with re-enabling .github/** as a trigger path (previously commented out), this materially increases the chance that ordinary merges to main auto-publish a release. The if: condition should also require github.event_name == 'workflow_dispatch'.
Evidence
if: >-
!failure() && !cancelled() &&
(needs.build.result == 'success' ||
needs.build_client.result == 'success' ||
needs.build_helm.result == 'success')
📝 Committable suggestion
| if: >- | |
| !failure() && !cancelled() && | |
| (needs.build.result == 'success' || | |
| needs.build_client.result == 'success' || | |
| needs.build_helm.result == 'success') | |
| if: >- | |
| github.event_name == 'workflow_dispatch' && | |
| !failure() && !cancelled() && | |
| (needs.build.result == 'success' || | |
| needs.build_client.result == 'success' || | |
| needs.build_helm.result == 'success') |
🤖 Prompt for AI agents
In .github/workflows/release.yml around lines 230-234, address this code-review finding: Release job now runs on push to main without a workflow_dispatch gate.
The `release` job creates the actual GitHub Release (via `gh release ...` logic further down) and is triggered by the `push` event on `main` (see the `on:` block, lines 15-20) as well as `workflow_dispatch`. The PR's change to the `if:` condition only adds a check on upstream job results (`needs.build.result == 'success'` etc.) but does not restrict execution to `github.event_name == 'workflow_dispatch'`. Per rule MESHAGEN-010-2, GitHub Release creation must only be triggered by workflow_dispatch, never by push alone — this rule explicitly warns against automatic releases on push. Combined with re-enabling `.github/**` as a trigger path (previously commented out), this materially increases the chance that ordinary merges to main auto-publish a release. The `if:` condition should also require `github.event_name == 'workflow_dispatch'`.
The flagged code:
```
if: >-
!failure() && !cancelled() &&
(needs.build.result == 'success' ||
needs.build_client.result == 'success' ||
needs.build_helm.result == 'success')
```
A suggested replacement for the flagged range:
if: >-
github.event_name == 'workflow_dispatch' &&
!failure() && !cancelled() &&
(needs.build.result == 'success' ||
needs.build_client.result == 'success' ||
needs.build_helm.result == 'success')
Make the minimal change that resolves the finding; do not refactor unrelated code.
confidence: 55 — react 👍/👎 to teach the reviewer
| branches: [main] | ||
| paths-ignore: | ||
| # - '.github/**' | ||
| - '.github/**' |
There was a problem hiding this comment.
🦩 🟠 [warn/recommended] Re-enabling '.github/**' as a release trigger path re-introduces build-on-workflow-change risk
The diff reverts the previously commented-out - '.github/**' line under paths-ignore, meaning pushes that only touch workflow files under .github/ will no longer be ignored and will now trigger the release workflow on push to main. Combined with the release job's push-triggered execution (see companion finding), this means routine workflow-file edits merged to main can now trigger a real release job. If this re-enablement is intentional it should be called out in the PR description; otherwise it silently expands the release workflow's trigger surface.
Evidence
- '.github/**'
🤖 Prompt for AI agents
In .github/workflows/release.yml around line 19, address this code-review finding: Re-enabling '.github/**' as a release trigger path re-introduces build-on-workflow-change risk.
The diff reverts the previously commented-out `- '.github/**'` line under `paths-ignore`, meaning pushes that only touch workflow files under `.github/` will no longer be ignored and will now trigger the release workflow on push to main. Combined with the `release` job's push-triggered execution (see companion finding), this means routine workflow-file edits merged to main can now trigger a real release job. If this re-enablement is intentional it should be called out in the PR description; otherwise it silently expands the release workflow's trigger surface.
The flagged code:
```
- '.github/**'
```
Make the minimal change that resolves the finding; do not refactor unrelated code.
confidence: 40 — react 👍/👎 to teach the reviewer
Problem
The
latestpre-release had zero uploaded assets, so the client download URL returned 404 and the Fleet agent could not install on feature environments:https://github.com/flamingo-stack/fleet/releases/download/latest/fleet-macos-universal.tar.gz-> 404Versioned releases were fine —
0.4.11,0.4.10and0.4.9each carry both client assets. Only the rollinglatesttag was affected. Tenant manifests are not involved:fleet.client.fleetTag: "latest"inopenframe-saas-tenantis unchanged and valid.Root cause
Three defects in
release.ymlcombine:.github/**is commented out inpaths-ignore(since 01a6bb8, 2026-01-28), so every merge from theFlamingo Code DocumentationandFlamingo Code Reviewbots triggersFleet Release. Those bots started merging intomainaround 2026-09-10, which matches the breakage window —0.4.11(2026-09-08) still has its assets.The
releasejob condition!failure() && !cancelled()acceptsskipped. With no server/client/helm changes,Build Fleet,Build ClientandBuild Helm Chartare skipped by the path filter, butCreate Releasestill runs, deleteslatestwith--cleanup-tagand recreates it empty. Recent runs finish in ~45s (run 35295742772).The fallback that re-attaches assets from the previous
latestnever worked:Prepare release artifactshas noGH_TOKEN, sogh release downloadfails withcould not find any host configurations, the error is swallowed by|| true, and the step logstotal 0.The release body is generated unconditionally, so the notes advertise client artifacts that are not attached.
Changes
.github/**inpaths-ignoreso bot-only pushes no longer trigger a release.Create Releaseruns.GH_TOKENtoPrepare release artifactsso client assets carry over when only the server or the chart changed.Verification
Build Client,Build Fleet,Build Helm Chartallskipped,Create Releasesuccessin 45s.Prepare release artifacts:could not find any host configurations, thentotal 0.gh api repos/flamingo-stack/fleet/releases/tags/latest --jq '.assets|length'returned0before the manual restore noted below.Note
To unblock feature environments before this lands, the two client assets from
0.4.11were uploaded manually to thelatestrelease. They are replaced by pipeline output on the next push that touches./orbitorgo.mod.