Avoid duplicate CI on the next to main tracking pull request

Open Beginner friendly
#3,910 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, yaml
Domain
ci-cd

Research direction

Start with .github/workflows/build.yml and .github/workflows/test.yml, especially their triggers, concurrency settings, and jobs around the linked lines. Compare behavior for pushes to next, same-repository pull requests from next to main, ordinary pull requests, and merge groups. Done means the tracking pull request creates skipped checks without allocating runners, while next still runs one full build and test suite.

Written by the indexing model from the issue text.

Description

The next to main release tracking pull request runs a second pull request suite whenever a commit lands on next. The same commit has already passed merge queue CI, then starts push CI on next. Updating the tracking pull request starts the same checks once more.

The build workflow and test workflow both run on pushes to next, synchronized pull requests, and merge groups. Their concurrency keys differ by event: a push uses refs/heads/next, while the tracking pull request uses its head label. cancel-in-progress therefore cannot collapse the push and pull request runs.

Commit 0a019a8 shows the full pattern:

Event Build Test
Merge queue run 35237712603 run 35237712596
Push to next run 35239131753 run 35239131830
Tracking pull request run 35239137652 run 35239137785

That last pass allocated an 8-vCPU WarpBuild runner to check all feature combinations for 11 minutes 49 seconds, run tests for 4 minutes 44 seconds, and run documentation tests for 1 minute 49 seconds. These jobs are defined in build.yml and test.yml.

From September 14 through 17, 19 updates to next caused 38 duplicate build and test workflow runs on the tracking pull request. Those runs used about 367 WarpBuild runner-minutes.

Keep full push CI on next. The build cache and test caches are saved only by that event. Instead, skip the jobs when the event is a same-repository pull request from next to main. Apply the condition at job level so the named checks are still created and reported as skipped. Do not skip ordinary pull requests or merge groups.

This is done when an update to next runs one full build and test suite after the merge queue, the tracking pull request allocates no runner, and all checks needed to merge the tracking pull request still reach a completed state.

Tracking pull request runs from September 14 through 17
Date (UTC) Commit Build Test
Sep 14 cfccece 34812962204 34812962122
Sep 14 5ed34eb 34818893615 34818893667
Sep 14 776cd2c 34828944687 34828944651
Sep 14 8de822f 34869817686 34869817611
Sep 15 a8329f5 34939998324 34939998301
Sep 15 3684725 34940863452 34940863388
Sep 15 3d5f97e 35031799982 35031800129
Sep 16 d93f7a2 35065921582 35065921449
Sep 16 d5f69d9 35080013549 35080013386
Sep 16 cd611d5 35086098338 35086098213
Sep 16 4998046 35090298847 35090298790
Sep 16 1043a68 35115811190 35115811238
Sep 16 b8ce82d 35152478116 35152478119
Sep 17 dd7ac80 35167708234 35167708255
Sep 17 70901f3 35190752705 35190752714
Sep 17 074c627 35198662334 35198662312
Sep 17 4493ae5 35202233271 35202233272
Sep 17 f5cf23a 35208995050 35208994946
Sep 17 0a019a8 35239137652 35239137785
Dominant language
Rust
Stars
133
Forks
168
Avg merge
2d 3h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 0xMiden/protocol

All issues in 0xMiden/protocol

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.