Skip to content

bug: ci: merge-group gate masks runner-capacity cancellations with missing scope #3633

Closed

Description

@zackees

Merge-group run 41859960760 failed in CI Gate job 126688014957 with CI Gate did not receive the merge group core scope. Event Data job 126678747964 logged core=true. macOS jobs 126679116973 and 126679117143 were cancelled without a runner. The gate depends on a reusable-workflow output and exits before listing jobs when that output is absent. Cross-repo capacity evidence: zackees/zccache run 41857782623 job 126671059827 observed macos-15 queued for 909s.

Maintainer-requested plan: independently resolve scope from the merge-group event/diff, diagnose runnerless cancellations fail-closed, and restore a Linux-only queue while preserving native execution on master push/nightly/release. Explicitly supersedes the queue-native decision in #3606. Add RED/GREEN regressions, run local gate, and collect real queue/push evidence. No ruleset changes.

Claiming: investigation and implementation of the supplied maintainer brief. First PR this session.

Activity

  1. added
    bug
    infra
    on Nov 4, 2026
  2. zackees commented on Nov 4, 2026

    @zackees
    MemberAuthor

    /ready

    Claiming: merge-group scope and capacity fix requested by the maintainer. 1. RED regression for lost reusable output and cancelled runnerless jobs. 2. Independent scope resolution and Linux-only queue routing with preserved push/native coverage. 3. Local gate, PR and real queue/push evidence. First PR this session.

  3. added
    ready
    on Nov 4, 2026
  4. zackees commented on Nov 4, 2026

    @zackees
    MemberAuthor

    Claiming: fix merge-group scope resolution and runner-capacity diagnosis; implement the maintainer-requested Linux-only queue policy. RED commit 3b23668 reproduces the failure. GREEN and PR follow this session.

  5. zackees commented on Nov 4, 2026

    @zackees
    MemberAuthor

    Blocked: hosted runner allocation prevents completing merge-queue and post-merge push verification. Fix and RED/GREEN tests are pushed in #3634; PR CI passed and the PR remains enqueued. Detailed run/job evidence and the outstanding proof are recorded at #3634 (comment).

  6. added
    claim-blocked
    on Nov 4, 2026
  7. vpacher commented on Nov 4, 2026

    @vpacher
    Member

    @zackees A concern on the split that #3634 sets: with the queue Linux-only, a macOS or Windows break can reach master, and it then costs other contributors more than the break itself.

    The problem

    1. A core PR runs Linux lanes only, and now so does the queue. A macOS or Windows break passes both.
    2. It lands on master. The master push run goes red, but nothing requires anyone to look at it.
    3. Other contributors branch from that master. When their PR selects a native lane, the break shows up in their PR, and they did not cause it.
    4. Each of them then spends time on a failure that is not in their diff, and several people can do this for the same break at the same time. The old comment in ci_scope.py describes one such case: bug: test_core_setup_rules_steps segfaults in the Windows Tier 2 lane, so master's Windows gate is red (#2881) #2910 surfaced in an unrelated shared/ PR's lane.

    So a fix-forward after the merge is not only the cost of one fix. Everyone who branched in that time pays for it, in confusion and in time, and the cause is harder to find because it is far from the PR that made it.

    This has already happened to master: #3595 broke Windows Tier 2 (LNK2005/LNK1169, #3606). The next 3 master pushes were red for the same reason, for about 2 hours, until #3604 repaired it. In the 94 master push runs from 11-01 to 11-04, 5 of the 9 failures were Windows Tier 2 link errors, and that break accounts for 4 of them.

    I understand why #3634 moved the lanes: a job with no runner must not stall the queue. In the 15 hours the native lanes were in the queue on 11-04 (#3608 to #3634), 4 of 20 queue runs failed, and in one of them a macOS job with no runner was the sole cause. That is a real cost, but it is a narrower problem than the native lanes themselves. The master push also does not avoid it: the first push after #3634 (41885535539) has both macOS jobs cancelled with no runner, and nothing reruns them.

    Would this work?

    1. Run the native Rust and Tier 2 lanes in the queue for core changes, as ci: Gate core merge batches on native Windows and macOS Tier 2 #3608 did.
    2. Retry "cancelled, no runner, no steps" with a limit. ci: resolve merge-group scope independently and keep the queue Linux-only #3634 already identifies this case. A retry applies only to a job that never ran, so it cannot hide a failed test. After the limit, it stays a failure.
    3. Skip the native lanes on the master push when the same tree passed them in the queue, and keep the nightly run as the backstop.

    The queue is close to one run per commit (117 queue runs, 94 master pushes), so I expect at most about 25% more native runs before step 3, and fewer after it. I did not measure that.

    Questions:

    • The macOS jobs end at about 15 minutes (18:17:02 to 18:32:05 on 41885535539). Is that limit ours or GitHub's? If it is ours, a longer wait could be the smallest change.
    • Is the limit the macOS runners shared across the org, so that the queue competes with PRs and other repos?
    • If the queue stays Linux-only, can a red master become visible to contributors, for example as a check on new PRs or as a required look before branching? That would at least tell them that a failure is not theirs.

    🤖 Generated with Claude Code

  8. zackees commented on Nov 4, 2026

    @zackees
    MemberAuthor

    how do we fix it

  9. removed
    claim-blocked
    on Nov 4, 2026
  10. vpacher commented on Nov 4, 2026

    @vpacher
    Member

    An addition to step 3, with data I already had. In a scan on 11-03, every master push was on a SHA that the queue had already passed (21 of 21). That repeated a median of 32 runner minutes per merge.

    The master push also saves caches, so it cannot simply go away. The split would keep the cache saves and skip the test runs that the queue already did on that SHA.

    The freed runner time could offset the native lanes in the queue. I have not checked how much of the 32 minutes is native, and the sample is small.

  11. vpacher commented on Nov 4, 2026

    @vpacher
    Member

    @zackees To answer "how do we fix it", three points. This replaces the steps in my comment above. Details can follow if you agree.

    1. Queue ejections for no runner are rare. In the last 7 days I found them only on 11-04, a day with two GitHub Actions incidents. So I would keep ejecting in that case and accept a re-queue now and then. It costs much less than a break on master that other contributors then inherit.

    2. Catch breaks as early as possible. Local first, then the PR, then only what the merge adds in the queue. Master and nightly keep what is too heavy for those, such as TSan. Most contributors cannot run MSVC locally, and Windows Tier 2 link errors were the native breaks that reached master, so I would start with Windows Tier 2 on core PRs. The author sees the break, and nobody else is affected. If breaks still get through, native lanes can go back in the queue, because of point 1.

    3. Do not repeat jobs. Every master push in a scan on 11-03 was on a SHA the queue had already passed (21 of 21), which repeated a median of 32 runner minutes per merge. Skip those test runs and keep the cache saves. That pays for most of point 2.

    A correction to my comment above: jobs with no runner also occurred on master pushes on 10-29 and 11-02, so not only on 11-04. Those did not eject anything from the queue.

    If you agree, I can file an issue for point 2 and open a PR.

  12. zackees commented on Nov 4, 2026

    @zackees
    MemberAuthor

    agreed

  13. vpacher commented on Nov 4, 2026

    @vpacher
    Member

    Thanks. Happy to take it. We can come back with a step-by-step plan in a new issue, so that each step lands alone and does not interrupt the queue or other work, in place of one big rework.

  14. vpacher commented on Nov 4, 2026

    @vpacher
    Member

    First standalone step: obs-rust/.github#29. It stops the coordinator treating a master push with only no-runner jobs as a code break, and it changes nothing in what CI runs. The plan for the other steps comes later in a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buginfraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions