Skip to content

added workflow concurrency to optimize runner usage#3189

Merged
npow merged 1 commit into
Netflix:masterfrom
agsaru:conc
May 10, 2026
Merged

added workflow concurrency to optimize runner usage#3189
npow merged 1 commit into
Netflix:masterfrom
agsaru:conc

Conversation

@agsaru

@agsaru agsaru commented May 9, 2026

Copy link
Copy Markdown
Contributor

PR Type

  • Bug fix
  • New feature
  • Core Runtime change (higher bar -- see CONTRIBUTING.md)
  • Docs / tooling
  • Refactoring

Summary

This PR adds concurrency controls to the ux-tests.yml and full-stack-test.yml GitHub Actions workflows.
Currently, if anyone pushes multiple commits to a PR very quick, GitHub Actions triggers workflows for every single commit. Since these workflows spin up heavy infrastructure like minikube, Tilt it comsumes a large amout of time.

So, This PR adds a concurrency block to the longer workflows:

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Copilot AI review requested due to automatic review settings May 9, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Actions workflow-level concurrency controls to reduce wasted CI capacity by canceling superseded workflow runs for pull requests (where rapid successive commits can otherwise trigger multiple long-running runs).

Changes:

  • Add a concurrency block to ux-tests.yml to cancel in-progress runs on PR updates.
  • Add a concurrency block to full-stack-test.yml to cancel in-progress runs on PR updates.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/ux-tests.yml Introduces workflow concurrency grouping and PR-only cancellation to avoid redundant heavy integration runs.
.github/workflows/full-stack-test.yml Introduces workflow concurrency grouping and PR-only cancellation to avoid redundant full-stack runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps

greptile-apps Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a concurrency block to two heavy GitHub Actions workflows (full-stack-test.yml and ux-tests.yml) so that pushing new commits to a PR cancels the in-progress run for the previous commit, saving minikube/Tilt infrastructure time. Push events to master are unaffected because the group key uses the unique commit SHA and cancel-in-progress is false for non-PR events.

  • full-stack-test.yml — straightforward single-job workflow; the concurrency block is correct and has no side-effects.
  • ux-tests.yml — workflow-level concurrency groups all four matrix backends plus the fast unit-tests job under the same key, so a cancelled PR run loses the unit-test result as a side-effect (see inline comment).

Confidence Score: 4/5

Safe to merge — the concurrency blocks are correctly scoped and will not affect master builds or manually dispatched runs.

Both workflows correctly distinguish push-to-master (unique SHA group, no cancellation) from pull-request (shared ref group, cancellation enabled). The only trade-off is that ux-tests.yml groups the fast unit-tests job under the same concurrency key as the heavy matrix jobs, meaning rapid PR commits can leave unit-test results missing. This is a minor quality concern, not a correctness issue.

ux-tests.yml — the workflow-level concurrency key covers both the lightweight unit-tests and the heavy matrix ux-tests jobs together.

Important Files Changed

Filename Overview
.github/workflows/full-stack-test.yml Adds a workflow-level concurrency block that cancels in-progress PR runs when new commits are pushed, while leaving master push runs unaffected (unique SHA-based group, cancel-in-progress=false).
.github/workflows/ux-tests.yml Adds the same concurrency block as full-stack-test.yml; the group key covers the entire workflow run (all 4 matrix backends), so a new PR commit cancels all matrix legs at once — correct behavior but worth noting that the fast unit-tests job is also cancelled as a side-effect.

Reviews (1): Last reviewed commit: "added workflow concurrency to optimize r..." | Re-trigger Greptile

Comment on lines +27 to +29
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Fast unit-tests job cancelled alongside heavy ux-tests

Because concurrency is applied at the workflow level, the lightweight unit-tests job (~30 s, no infrastructure) is cancelled together with the expensive matrix ux-tests jobs whenever a new PR commit arrives. In practice this means you can push a second commit and never see a unit-test result for the first one, which can hide quick feedback. Splitting unit-tests into its own workflow (or moving it to a dedicated file that doesn't have this concurrency block) would let it always run to completion while still cancelling the heavy ux-tests on outdated commits.

@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@ae9420e). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3189   +/-   ##
=========================================
  Coverage          ?   28.29%           
=========================================
  Files             ?      381           
  Lines             ?    52343           
  Branches          ?     9238           
=========================================
  Hits              ?    14808           
  Misses            ?    36597           
  Partials          ?      938           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@npow
npow merged commit f277f45 into Netflix:master May 10, 2026
44 of 45 checks passed
@agsaru
agsaru deleted the conc branch June 10, 2026 17:40
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.

3 participants