Skip to content

Add a ci-complete gate job and bound job runtimes - #65

Open
Gary Hsu (bghgary) wants to merge 2 commits into
microsoft:masterfrom
bghgary:harden-ci-apt-and-add-gate-job
Open

Add a ci-complete gate job and bound job runtimes#65
Gary Hsu (bghgary) wants to merge 2 commits into
microsoft:masterfrom
bghgary:harden-ci-apt-and-add-gate-job

Conversation

@bghgary

@bghgary Gary Hsu (bghgary) commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

[Created by Copilot on behalf of Gary Hsu (@bghgary)]

Context

master requires no status checks, so an approval alone can merge a PR whose CI is red or never ran. Requiring the current checks as-is is not viable: all 14 names are matrix-generated, so any matrix edit strands a required check that never reports and leaves PRs blocked with no visible cause. ci-complete is one stable name to require instead.

timeout-minutes is a precondition for that, not a separate cleanup. Three Linux jobs hung for ~6h on 19 August with no output at all before the 360-minute default timeout (actions/runner-images#14594). Once a check is required, an unbounded hang is not a slow build — it is an unmergeable PR with no failure to act on.

Worth a look

  • if: always() on ci-complete is load-bearing. Without it the job is skipped when a dependency fails, and a skipped required check satisfies the requirement — inverting the gate. Two workflows differing only in that line produced skipped against failure.
  • The assertion is positive — every entry of needs.*.result must equal success — so a result value we have not anticipated fails closed rather than passing through.
  • clang++-14 is not a package name. apt fell through to regex matching and installed 20 packages instead of 2, including clang-14-doc and clang-14-examples; clang-14 alone ships the clang++-14 binary. cxx still feeds CMake, so the install list moves to a separate packages key.
  • No apt workaround here, deliberately. The runner image sets APT::Acquire::Retries "10"; overriding it would trade resilience against ordinary transient failures for a faster fail in one case, and the root cause is fixed image-side by actions/runner-images#14596.

Follow-up

Once ci-complete has reported here at least once, it can be added to master's required status checks.

Gary Hsu (bghgary) and others added 2 commits August 19, 2026 16:04
Bound apt's retries and transfer timeouts so a degraded in-datacenter mirror
fails fast instead of stalling silently for hours, and cap every job with
timeout-minutes so a future stall is a fast diagnosable failure rather than a
6h timeout.

Install clang-14 alone; clang++-14 is not a package name, so apt fell through
to regex matching and pulled in 20 packages where 2 were meant.

ci-complete aggregates the four jobs behind one stable check name that branch
protection can require, leaving the matrix-generated names free to change.
if: always() is required or the job is skipped when a dependency fails, and a
skipped required check satisfies the requirement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The runner image deliberately sets APT::Acquire::Retries 10; overriding it to 1
trades resilience against ordinary transient failures for a faster fail in one
pathological case. actions/runner-images#14596 fixes the root cause image-side
by demoting the azure mirror, which a workflow cannot do. timeout-minutes
already bounds the hang, and it bounds every other hang too.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bghgary Gary Hsu (bghgary) changed the title Harden Linux apt step and add a ci-complete gate job Add a ci-complete gate job and bound job runtimes Aug 19, 2026
@bghgary
Gary Hsu (bghgary) marked this pull request as ready for review August 19, 2026 23:49
Copilot AI lite review requested due to automatic review settings August 19, 2026 23:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a stable “aggregate” GitHub Actions check (ci-complete) that can be required by branch protection without being impacted by matrix job name churn, and bounds CI job runtimes to avoid indefinite hangs that would otherwise block merges once checks are required.

Changes:

  • Add timeout-minutes to existing Windows/macOS/iOS/Linux jobs to bound runtime.
  • Refactor Linux compiler matrix to install compiler toolchains via a dedicated packages key (avoids treating clang++-14 as an apt package).
  • Add a ci-complete gate job that always runs and fails unless all dependent jobs report success.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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