Skip to content

CI: cancel a superseded release-branch push run, and select the next push's lanes from the last green one #248

Open

Description

@CaffeinatedCoder

Why

dotnet.yml cancels in-progress runs only for pull requests. When several topics merge into release/<version> within minutes (three pushes to release/2.3.1 within a minute on 31 Oct), GitHub already drops the queued runs in between. But the in-progress run for an older commit keeps the group for its full ~18 minutes, and the newest commit waits behind it.

Cancelling it is not enough on its own. A push run selects its lanes by git diff <before> HEAD. If the run for commit A (say src/CodoMetis.TypeKit.Analyzers, so the Windows leg) is cancelled by commit B (docs only, so the Linux prose suite), B's run diffs only B. A's Windows leg then never runs on the branch until the nightly.

Proposal

  • cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')) }}. main, a dispatch, the nightly and a call from release.yml (a tag push) still run to the end. PR hygiene keeps its own policy (PR hygiene cancels its own runs, and a cancelled run of the required check blocks the merge #144).
  • ci-lanes select diffs a push to release/** against the head of the last push run of dotnet.yml on that branch that finished green, not against before. If there is none, or it can't be read, every lane runs. That needs actions: read for the changes job. CiLanes.Tests gain a row for a cancelled predecessor, shown failing against the before diff first.
  • A decision record amending 0113's selection for pushes.

Done when

A burst of merges into a release branch leaves one run going. The run after a cancelled one selects every lane the cancelled commits needed, shown by a CiLanes test and by one real burst.

Activity

  1. added this to the 2.4.0 milestone on Oct 31, 2026
  2. added
    chore
    area/tooling
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/toolingchore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions