Skip to content

Read a Superseded Run's Failed Aggregator as Superseded in pr_review.py wait #3254

Closed

Description

@ptr727

Problem

scripts/pr_review.py wait reads a failed check from a superseded workflow run as a verdict on the current head, and exits 44 (CHECKS_NOT_MERGEABLE) at once while the run that replaces it is still in progress.

The shape that produced it, in a downstream repository:

  1. A pull request is opened, and its first pull_request run starts.
  2. The pull request is closed and reopened, the documented way to make CI pick up a label added after creation. GitHub cancels the first run, whose aggregator job, Check pull request workflow status job, then fails over the cancelled jobs.
  3. The reopen starts a second run on the same head SHA.
  4. wait reports CHECK FAILED ('Check pull request workflow status job', COMPLETED/FAILURE): a verdict rather than a stuck check and exits 44 after about a second. The second run's jobs are still IN_PROGRESS, and its own aggregator has not posted yet.

The second run finished green, and its aggregator then replaced the failed one, so status read checks=12/12 merge=CLEAN. A bounded gh run watch <run> --exit-status on the second run was the workaround.

Expected

Where the same head has a newer run of the same workflow, wait reads that run's checks rather than a cancelled run's. Failing that, it should report a failed check from a cancelled run as superseded rather than as a verdict.

Acceptance

  • wait on a head whose first run was cancelled and whose second run is in progress keeps waiting, or names the newer run, rather than exiting 44.
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions