Skip to content

perf(ci): Reuse integration dependency installs within test workers - #26720

Merged
nicohrubec merged 17 commits into
developfrom
feat/benchmark-integration-install-timings
Nov 23, 2026
Merged

nicohrubec merged 17 commits into
developfrom
feat/benchmark-integration-install-timings

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

What

Reuse identical fixture dependency installations within each Linux CI test worker. Install once per dependency set, then copy into separate scenario directories; custom-setup cases retain fresh installs, and copy failures fall back to a fresh install.

So this does not key on individual dependencies but rather reuses the whole node_modules and package-lock.json in case two scenarios share the exact same dependencies.

Why

Our integration tests install a lot of dependencies and many of these get installed over and over again. This PR implements an in-runner cache to avoid duplicate installs in a CI run. I also tested a persistent GitHub runner cache. In theory this should be even faster because we also save installs across CI runs. However, I did not observe a notable speedup beyond the current approach at the cost of a >2GB cache entry for one dependency set and a lot more added complexity to keep this up to date and not explode in size.

Benchmark on the same develop base (41856af), with reuse disabled → enabled:

Runtime Average whole job Slowest test step
Node 20 2:19 → 2:10 1:59 → 1:44
Node 22 2:23 → 2:18 2:18 → 1:54
Node 24 2:13 → 2:03 2:10 → 1:45
Node 26 2:15 → 2:02 2:06 → 1:40
Node 27 alpha 2:27 → 2:13 1:58 → 1:38
Bun 1.3.14 2:07 → 2:03 1:59 → 1:51
Bun 1.4 2:07 → 2:01 1:57 → 1:50

Average jobs improved by 4–14s, and slowest test steps by 7–26s. Baseline → reuse, first attempt. Single runs; job durations exclude queues and the shared build.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@nicohrubec nicohrubec changed the title test(ci): Benchmark integration dependency installation test(ci): Benchmark keyed integration dependency reuse Nov 21, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .github/workflows/build.yml Resolved
Comment thread .github/workflows/build.yml Resolved

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@nicohrubec nicohrubec changed the title test(ci): Benchmark keyed integration dependency reuse perf(ci): Cache integration test dependency installations Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 6 not successful, 56 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Failing after 39s Details
❌ CI: Optional E2E Tests / E2E node-openai-decisions Test (optional) Failing after 32s Details
❌ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Failing after 1m Details
❌ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Failing after 4m Details
❌ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Failing after 25s Details
❌ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Failing after 29s Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries Test (optional) Successful in 49s Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E cloudflare-mastra Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (cloudflare) Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E cloudflare-think Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (deno) Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable Test (optional) Successful in 47s Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E node-eve Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-mastra Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E express-5 (cloudflare) Test (optional) Successful in 52s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E express-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E express-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 56s Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (cloudflare) Test (optional) Successful in 33s Details
✅ CI: Optional E2E Tests / E2E nestjs-12 (bun) Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 45s Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 54s Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 51s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 29s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 42s Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 41s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 53s Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 50s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 39s Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 32s Details
✅ CI: Optional E2E Tests / E2E node-flue Test (optional) Successful in 1m Details

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: adf11c3 (PR test merge using develop at d6653bb)

Against: d6653bb (develop) · base run #67480

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.26 kB - -
@sentry/browser - with treeshaking flags 28.45 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.33 kB - -
@sentry/browser (incl. Tracing) 52.9 kB - -
@sentry/browser (incl. Tracing Core) 40.32 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.9 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.77 kB - -
@sentry/browser (incl. Tracing, Replay) 92.95 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.78 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.3 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.88 kB - -
@sentry/browser (incl. Feedback) 48.2 kB - -
@sentry/browser (incl. sendFeedback) 30.84 kB - -
@sentry/browser (incl. FeedbackAsync) 35.87 kB - -
@sentry/browser (incl. Metrics) 31.58 kB - -
@sentry/browser (incl. Logs) 31.86 kB - -
@sentry/browser (incl. Metrics & Logs) 32.52 kB - -
@sentry/react 32.27 kB - -
@sentry/react (incl. Tracing) 55.49 kB - -
@sentry/vue 38.45 kB - -
@sentry/vue (incl. Tracing) 55.82 kB - -
@sentry/svelte 30.27 kB - -
@sentry/effect (client) 301.05 kB - -
@sentry/effect (client, incl. Tracing) 308.22 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 311.08 kB - -
@sentry/remix (Remix 3 client bundle) 58.52 kB - -
CDN Bundle 32.19 kB - -
CDN Bundle (incl. Tracing) 53.28 kB - -
CDN Bundle (incl. Logs, Metrics) 34.97 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.84 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.05 kB - -
CDN Bundle (incl. Tracing, Replay) 91.2 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.82 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.63 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.17 kB - -
CDN Bundle - uncompressed 93.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 157.52 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.32 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 165.14 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.55 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 277.79 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 285.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.72 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 297.34 kB - -
@sentry/nextjs (client) 59.26 kB - -
@sentry/sveltekit (client) 54.15 kB - -
@sentry/core/server 45.75 kB - -
@sentry/core/browser 14.41 kB - -
@sentry/node 155.89 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.46 kB - -
@sentry/node - without tracing 88.94 kB - -
@sentry/node - without channel injection 144.83 kB +0.01% +5 B 🔺
@sentry/aws-serverless 99.56 kB -0.01% -5 B 🔽
@sentry/cloudflare (withSentry) - minified 209.05 kB - -
@sentry/cloudflare (withSentry) 485.09 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 1.04 MB - -
@sentry/nextjs/cloudflare (withSentry) - minified 234.28 kB - -

View base workflow run

@nicohrubec
nicohrubec force-pushed the feat/benchmark-integration-install-timings branch from b108739 to 708f250 Compare November 23, 2026 09:06
@nicohrubec nicohrubec changed the title perf(ci): Cache integration test dependency installations perf(ci): Reuse integration dependency installs within test workers Nov 23, 2026
nicohrubec and others added 15 commits November 23, 2026 10:08
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
Co-Authored-By: OpenAI Codex <codex@openai.com>
@nicohrubec
nicohrubec force-pushed the feat/benchmark-integration-install-timings branch from 708f250 to 75a3fab Compare November 23, 2026 09:09

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 75a3fab. Configure here.

Co-Authored-By: OpenAI Codex <codex@openai.com>
return installation;
}

const NPM_INSTALL_MAX_RETRIES = 3;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

from here on downwards this was just moved to this file as is

Co-Authored-By: OpenAI Codex <codex@openai.com>
@nicohrubec
nicohrubec marked this pull request as ready for review November 23, 2026 10:02

@mydea mydea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems a bit complicated, but this was already complicated before xD and the savings seem worth it 👍

@nicohrubec
nicohrubec merged commit f7dfdf4 into develop Nov 23, 2026
365 of 371 checks passed
@nicohrubec
nicohrubec deleted the feat/benchmark-integration-install-timings branch November 23, 2026 10:28
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.

2 participants