Skip to content

fix(template): Make "Finished Build and Publish" gate reflect real build outcome#614

Open
lfrancke wants to merge 1 commit into
mainfrom
fix/finished-gate-required-check
Open

fix(template): Make "Finished Build and Publish" gate reflect real build outcome#614
lfrancke wants to merge 1 commit into
mainfrom
fix/finished-gate-required-check

Conversation

@lfrancke

@lfrancke lfrancke commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

The finished job (Finished Build and Publish) is the single required status check for the build workflow. We did this so we don't have to list every step in between as required.

During our 26.7 release we saw a build that succeeded even though it shouldn't have: https://github.com/stackabletech/listener-operator/actions/runs/29825092091

Fix

Github considers skipped jobs as succeeded rather than failing the job. So we need to make sure our finished job always runs.

This PR changes it by introducing an if: always() to the job

  • if: always() so the gate always runs and reports a real success/failure conclusion.
  • List every leaf job directly in needs and fail on any failure/cancelled result. publish-index-manifest was previously only a transitive dependency (via openshift-preflight-check), so its failure would not surface in needs.*.result even with always().
  • skipped is tolerated on purpose, jobs skip legitimately on merge_group events, forks, and when detect-changes finds no relevant changes.

…ild outcome

The `finished` job is the single required status check for the build
workflow. It had no `if:` clause, so a failed dependency caused GitHub to
*skip* it rather than fail it - and branch protection treats a skipped
required check as passing. A broken build (e.g. a failed
publish-index-manifest) therefore became mergeable.

Two fixes:

- Add `if: always()` so the gate always runs and reports a real
  success/failure conclusion.
- List every leaf job directly in `needs` and fail the gate on any
  `failure`/`cancelled` result. Previously publish-index-manifest was only
  a transitive dependency (via openshift-preflight-check), so its failure
  would not surface in `needs.*.result`. `skipped` is tolerated, since jobs
  skip legitimately on merge_group events, forks, and when detect-changes
  finds no relevant changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lfrancke lfrancke self-assigned this Jul 21, 2026
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Jul 21, 2026
@Techassi
Techassi self-requested a review July 21, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

1 participant