Skip to content

ci(health-check): lift matrix to callers and add run-condition gate#7056

Merged
xmfcx merged 2 commits intomainfrom
ci/health-check/move-matrix
Apr 24, 2026
Merged

ci(health-check): lift matrix to callers and add run-condition gate#7056
xmfcx merged 2 commits intomainfrom
ci/health-check/move-matrix

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 23, 2026

  • Move the build-type/platform/runner matrix out of health-check-reusable.yaml and into each caller (health-check.yaml, health-check-pr.yaml); the reusable now takes build-type, platform, and runner as inputs so callers can tailor the matrix independently.
  • Add a run-condition input (default true) and gate the reusable's docker-build job with if: inputs.run-condition; health-check-pr always fires the matrix and derives run-condition from its changed-files + require-label gates.

Why

Before & After
image

Branch protection requires the health-check matrix jobs to report, but health-check-pr was skipping the whole job when a PR touched none of the watched paths, leaving required checks stuck on Expected — Waiting for status to be reported. Always-firing the matrix with an internal run-condition gate lets the inner job skip cleanly while still reporting a completed status, matching the pattern already used by autoware_universe's build-and-test-packages-above-differential. Lifting the matrix to callers is a natural follow-on so each trigger (main push / schedule / PR) can choose its own matrix shape.


⚠️ Branch protection update required before merging. This renames the required status check from health-check / docker-build (main) to health-check (main) / docker-build (the matrix axis now appears on the outer caller job). The main branch protection rule must be updated to require the new name; otherwise merges will block on the old, never-reported check.

Test plan

  • Open this PR without the run:health-check label; confirm health-check (main) / docker-build, health-check (nightly) / docker-build, and health-check (main-arm64) / docker-build all report success (matrix fires, inner job skips on run-condition: false).
  • Add the run:health-check label; confirm the same three jobs re-run and actually execute the build steps (non-trivial runtime, BuildKit cache restore visible in logs).
  • On a follow-up PR that touches no watched paths (e.g. a docs-only change), confirm the three matrix checks still report success (skipped path) and do not stay on Expected.
  • After merge, verify the scheduled/cron run of health-check.yaml on main still executes all three matrix legs end-to-end (no run-condition default changes its behavior).
  • Confirm branch-protection on main has been updated to require health-check (main) / docker-build (and any other legs that were previously required) before merging this PR.

Two related refactors to the health-check workflow pair:

- Move the build-type/platform/runner matrix out of health-check-reusable
  and into each caller (health-check on main/schedule/dispatch, and
  health-check-pr on PRs). The reusable now takes build-type, platform
  and runner as inputs, so callers can tailor the matrix independently.

- Add a run-condition input (default true) and gate the reusable job
  with if: inputs.run-condition. health-check-pr always fires the matrix
  and passes run-condition derived from its changed-files + require-label
  gates, so required status checks always report (the inner job just
  skips cleanly when gated off). Same pattern is already used by
  autoware_universe's build-and-test-packages-above-differential.

Note: the required status check name changes from
'health-check / docker-build (main)' to 'health-check (main) / docker-build'.
Branch protection on main must be updated to require the new name.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx requested a review from oguzkaganozt as a code owner April 23, 2026 15:53
@xmfcx xmfcx added the type:ci Continuous Integration (CI) processes and testing. label Apr 23, 2026
@xmfcx xmfcx self-assigned this Apr 23, 2026
@xmfcx xmfcx added the type:ci Continuous Integration (CI) processes and testing. label Apr 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx added the run:health-check Run health-check label Apr 23, 2026
Adds a terminal gate job that depends on install-dev-env and passes when
the matrix succeeded or skipped. Branch protection can require
install-dev-env-required instead of the individual matrix legs, so PRs
that gate off (no matching paths or missing label) still satisfy the
required check.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx merged commit 9883bc1 into main Apr 24, 2026
26 of 32 checks passed
@xmfcx xmfcx deleted the ci/health-check/move-matrix branch April 24, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check type:ci Continuous Integration (CI) processes and testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants