chore(ci): Streamline CI setup to split bundle, layer, tarball generation#20396
Merged
chore(ci): Streamline CI setup to split bundle, layer, tarball generation#20396
Conversation
…install Replace `file:` directory references with `npm pack` tarballs when installing @sentry/* packages into the Lambda layer's node_modules. Previously, `yarn install` used `file:` references to workspace packages with a fresh cache folder (to avoid stale cache issues), taking ~52s. With tarballs, yarn can use its global cache and the install completes in ~8s. Only transitive dependencies of @sentry/aws-serverless are packed (~5 packages), keeping the packing step fast. Total layer build time: ~97s → ~15s. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead, only build this before uploading artifacts, as we do not really need this before.
…l-based install" This reverts commit 7203205.
Contributor
size-limit report 📦
|
4481233 to
8c330ce
Compare
use correct nx version fix linting
This reverts commit e2107f0.
4 tasks
mydea
commented
Apr 23, 2026
| "outputs": [ | ||
| "{projectRoot}/build/types", | ||
| "{projectRoot}/build/types-ts3.8", | ||
| "{projectRoot}/*.d.ts" |
Member
Author
There was a problem hiding this comment.
this was not properly cached before, but we generate types into the root directory here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c36e943. Configure here.
1a9ca06 to
4f8cd17
Compare
Member
Author
logaretm
approved these changes
Apr 23, 2026
s1gr1d
approved these changes
Apr 24, 2026
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
Restructures the CI Build & Test pipeline to split the monolithic build step into parallel jobs and eliminate redundant work, reducing the critical path for test execution.
Key changes
Split build into parallel jobs:
Buildjob now only runsbuild:transpile,build:types, andbuild:extension(viayarn build:ci)job_build_bundles) run in a separate parallel job afterBuild— only when browser integration tests are affectedjob_build_layer) runs in its own job — only when@sentry/aws-serverlessor related E2E tests are affectedjob_build_tarballs) is a dedicated job that replaces the oldjob_e2e_preparestepSmarter build artifact handling:
CACHED_BUILD_PATHSlist with a dynamic Nx-derived artifact path computation (scripts/ci-print-build-artifact-paths.mjs) that reads the Nx project graph to determineexactly which output directories to upload
BUILD_CACHE_TARBALL_KEY) — tarballs are now built once and passed as artifacts, not cached across runsbuild-output,build-bundle-output,build-layer-output), so downstream jobs only download what they needE2E test matrix generation moved into Build:
ci:build-matrix) is now computed inside theBuildjob instead of a separatejob_e2e_preparejobjob_e2e_prepareas a separate step and shaves off the sequential dependencyNX cache improvements:
.nxcacheto.nx/cache(includesworkspace-datafor better cache hits)actions/cache(save+restore) toactions/cache/savein Build +actions/cache/restorein downstream jobs${{ github.head_ref }}-${{ github.run_id }}) for more predictable behaviorOther cleanups:
getTestMatrix.ts→getTestMatrix.mjs— removed thets-node,glob, andyamldependencies by rewriting as plain ESM withnode:fsandnode:utilangulardependency resolution for CI buildsnestjstypes output for proper cachingBefore → After pipeline structure
Somehow, cache restoration with nx seems hit or miss, it works sometimes but not other times. I opened an issue here: nrwl/nx#35403 - fixing this would improve this by a couple minutes, so would be nice to get there...