Skip to content

Builds: the pull_request run of a commit the push run already sent shows that build's result instead of comparing again (case studies 9b) - #221

Merged
ndbroadbent merged 1 commit into
mainfrom
twin-builds
Dec 4, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
twin-builds

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Case-study item 9b: a workflow with both push and pull_request triggers makes two builds for every PR commit, and both were compared and charged.

I chose the server side. The Action can't tell, on a push run, that a pull request run is coming (or has run), and skipping either one loses something: the push run is the only one without a PR, and the PR run carries pr_number. The docs half (pull_request plus push to main) is already in marketing #174.

How it works: reruns::twin. A CI build whose sent snapshots are field for field those of an earlier finalized build follows it, using the same covered_by_build_id path as an empty rerun (sc-9044). It concludes with that build's result and review, a review of the earlier build reaches it, and nothing is compared or charged again. Both builds must also match on:

  • project, suite, environment, commit and branch;
  • visualci.yml, base branch, subset and shards;
  • one having a pull request and the other not.

It must also be within the hour, with no project settings change and no other approval of the suite in between. Anything else is compared as usual, so a re-run of the same workflow still compares afresh (baselines::a_rerun_never_compares_with_its_own_unapproved_build).

The follower's warning says why: "This run sent the same snapshots of this commit as build #N (a workflow that runs on both push and pull_request?)…". not_reviewable's text now covers both cases.

Test: reruns::a_second_run_that_sent_the_same_snapshots_follows_the_first. It fails without the change.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ows that build's result instead of comparing again (case studies 9b)
@ndbroadbent
ndbroadbent merged commit 19cb25a into main Dec 4, 2026
16 checks passed
@ndbroadbent
ndbroadbent deleted the twin-builds branch December 4, 2026 18:07
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.

1 participant