[code-infra] Migrate CircleCI jobs to Gen2 resource classes#48593
Merged
Conversation
Switch every resource_class declaration to its .gen2 counterpart for an all-Gen2 baseline. Per-job overrides for jobs where Gen2 doesn't pay off will follow once we have CI duration data to compare against the master 24h Insights median. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploy previewhttps://deploy-preview-48593--material-ui.netlify.app/ Bundle size
Check out the code infra dashboard for more information about this PR. |
Resolves lockfile drift on eslint-plugin-import — its eslint-import-resolver-typescript reference was being expanded into a nested form that simplifies away after dedupe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_e2e and test_e2e_website are IO-bound (image pull + pnpm install +
Playwright dominates the wall-clock), so Gen2 saved very little
wall-clock while still charging the +20% per-minute premium:
test_e2e: 69s Gen1 → 60.5s Gen2 (1.14× speedup, below 1.20× break-even)
test_e2e_website: 83s on Gen2 (no master baseline in pipeline workflow,
follows the same mui-x precedent for e2e jobs)
Same pattern we saw on mui-x in mui#22610.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
test_static (1.18×), test_bundle_size_monitor (1.20×), and test_regressions (1.21×) all hover right around the 1.20× break-even threshold where Gen2 stops paying for itself. With N=2 PR runs the signal is too noisy to call them solidly above break-even, and the credit math is essentially flat either way. Reverting them to Gen1 makes the per-job behavior more predictable and removes the risk of an unlucky variance swing pushing them below break-even on master. Net credit reduction vs master stays at ~-20% per pipeline run; the remaining four CPU-bound jobs (test_browser, test_browser_legacy, test_unit, test_lint, test_types) all cleared 1.4× or better and carry the savings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Janpot
approved these changes
May 29, 2026
Janpot
left a comment
Member
There was a problem hiding this comment.
Very nice, we could potentially experiment with upgrading test_regressions resource class and increased parallelism as well
Member
|
It looks like this PR broke CircleCI job on master: https://app.circleci.com/pipelines/gh/mui/material-ui/175498 |
3 tasks
LukasTy
added a commit
to LukasTy/material-ui
that referenced
this pull request
Jun 1, 2026
mui#48557 added `resource_class: 'medium+'` and mui#48593 added `resource_class: medium` to the test_regressions job ~3h apart. Neither produced a textual conflict (different lines), so the merged config ended up with two `resource_class` keys — invalid YAML. CircleCI fails to parse config.yml and every pipeline on master errors before any job runs. Consolidate to a single `resource_class: medium+` directly under `<<: *default-job`, matching the other executor jobs (test_browser, test_e2e, ...). medium+ is still a Gen1 class — honoring mui#48593's revert off Gen2 — while preserving mui#48557's bump for the parallelized visual regression screenshots. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
Sorry. Fixed already. Caused by merging without syncing with master, which got different related changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CircleCI shipped Gen2 x86 Docker resource classes (GA 2026-05-04). They cost +20% per minute over Gen1 but advertise ~1.4× wall-clock speedup, so anything faster than 1.2× is a net credit win.
We just landed the same migration on mui-x in mui/mui-x#22610 (~21% credit reduction). This PR replicates that for material-ui: an all-Gen2 lift, then revert any job that doesn't clear 1.20× comfortably.
Per-job results
Four PR runs on this branch (one with a partial failure on test_browser_legacy, excluded from that row only). PR averages vs master 24h Insights median.
* test_lint run #2 had a 150s ESLint step (vs 9-20s normally on every other run including master) — treated as a transient infra hiccup and excluded.
† test_static N=2 valid Gen2 runs (run #1 failed at the dedupe check, fixed in
485751e6).‡ test_e2e_website doesn't run on master (triggered after docs deploy), so no master baseline. Reverted in line with the rest of the e2e jobs — all IO-bound (image pull + pnpm install + Playwright dominates wall-clock).
Run #4 (commit
cf72803021) validates the five reverts — each ran on its expectedmediumGen1 executor.Credit math
Per pipeline run, using master medians × Gen1 rates vs PR Gen2 averages × Gen2 rates (Gen1 jobs use master median as the steady-state estimate).
Where the savings come from:
In line with mui-x's −21 to −23% range.
Caveats / follow-ups
Test plan
pipelineworkflow across 4 PR runs.mediumGen1 executor.🤖 Generated with Claude Code