Skip to content

ci(pr-review-companion): run independent steps in parallel - #45580

Open
caugner wants to merge 1 commit into
mainfrom
run-independent-ci-steps-in-parallel
Open

ci(pr-review-companion): run independent steps in parallel#45580
caugner wants to merge 1 commit into
mainfrom
run-independent-ci-steps-in-parallel

Conversation

@caugner

@caugner caugner commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Description

Update the PR review companion workflow to run independent, network-bound steps in parallel using the GitHub Actions parallel step group:

  • the artifact download and the mdn/content checkout,
  • the status update, GCP authentication, and Node setup.

Motivation

Speed up CI by overlapping independent download, checkout, and setup steps instead of running them serially.

Additional details

Uses the parallel step keywords introduced in GitHub Actions on 2026-06-25: https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/

parallel is shorthand for background: true on each step followed by an implicit wait: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsparallel

Measured over the last 25 runs of the review job, this saves about 4s of a ~48s job (8%), consistently 7-9% per run. Group 1 collapses Download artifact (1-3s) into Checkout (mdn/content) (4-11s); group 2 collapses Mark status as pending (1-4s) and Authenticate with GCP (0-1s) into Setup (mdn/content) (4-5s).

One behavior change: Checkout (mdn/content) is no longer gated on HAS_ARTIFACT, because it now precedes the Check for artifacts step. It runs concurrently with the artifact download, so there is no wall-clock cost.

The other workflows in this repository were checked and left unchanged. interfacedata-updater.yml would save ~8s but only runs weekly, and pr-reviewdog.yml saves a median of 0s (its artifact download is under a second, and Setup reviewdog executed in only 2 of 25 sampled runs). The rest, including test.yml, markdown-lint.yml, the pr-check_*.yml set, spelling-check-bot.yml, and auto-cleanup-bot.yml, are strict checkout -> setup-node chains: node-version-file: .nvmrc and cache: npm both need the checkout to have finished, so there is nothing independent to overlap.

Note that this workflow triggers on workflow_run only, so it does not run on this PR.

Related issues and pull requests

Part of mdn/fred#1862.

Follows mdn/rari#775.

@github-actions github-actions Bot added system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed labels Sep 8, 2026
Use the GitHub Actions `parallel` step group to overlap independent,
network-bound steps instead of running them serially:

- the artifact download and the `mdn/content` checkout,
- the status update, GCP authentication, and Node setup.

The checkout is no longer gated on `HAS_ARTIFACT`, as it now precedes the
`Check for artifacts` step.
@caugner caugner changed the title ci: run independent steps in parallel ci(pr-review-companion): run independent steps in parallel Sep 8, 2026
@caugner
caugner force-pushed the run-independent-ci-steps-in-parallel branch from 12e87e3 to 84b3d0b Compare September 8, 2026 21:03
@caugner
caugner marked this pull request as ready for review September 8, 2026 21:05
@caugner
caugner requested a review from a team as a code owner September 8, 2026 21:05
@caugner
caugner requested review from LeoMcA and removed request for a team September 8, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m [PR only] 51-500 LoC changed system [PR only] Infrastructure and configuration for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants