Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,16 @@ jobs:
compression-level: 6
overwrite: true

- name: Upload test-utils tarball artifact
uses: actions/upload-artifact@v7
with:
name: build-test-utils-tarball-output
path: dev-packages/test-utils/*.tgz
if-no-files-found: error
retention-days: 4
compression-level: 6
overwrite: true

job_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We need to add the `always()` check here because the previous step has this as well :(
Expand Down Expand Up @@ -1091,6 +1101,12 @@ jobs:
name: build-tarball-output
path: ${{ env.TARBALL_ARTIFACT_DOWNLOAD_PATH }}

- name: Restore test-utils tarball artifact
uses: actions/download-artifact@v8
with:
name: build-test-utils-tarball-output
path: dev-packages/test-utils

- name: Restore build layer artifacts
uses: actions/download-artifact@v8
if: matrix.test-application == 'aws-serverless' || matrix.test-application == 'aws-serverless-layer'
Expand Down Expand Up @@ -1236,6 +1252,12 @@ jobs:
name: build-tarball-output
path: ${{ env.TARBALL_ARTIFACT_DOWNLOAD_PATH }}

- name: Restore test-utils tarball artifact
uses: actions/download-artifact@v8
with:
name: build-test-utils-tarball-output
path: dev-packages/test-utils

# Installs Playwright while the app builds.
# Started after the artifact downloads: starting next to them made `download-artifact` fail to read the event file.
- name: Install Playwright
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:

CACHED_BUILD_PATHS: |
${{ github.workspace }}/packages/*/*.tgz
${{ github.workspace }}/dev-packages/test-utils/*.tgz
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/*/node_modules
${{ github.workspace }}/dev-packages/*/node_modules
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dist-serverless/
sentry-node-serverless-*.zip
# node tarballs
packages/*/sentry-*.tgz
dev-packages/test-utils/sentry-*.tgz
.nxcache

# logs
Expand Down
4 changes: 4 additions & 0 deletions dev-packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ that point to the versioned tarballs. When a test application is run, pnpm overr
`pnpm-workspace.yaml` to pin all `@sentry/*` and `@sentry-internal/*` packages to those local tarballs. This means test apps
install the packages as if they were published, but from the local build output instead of a registry.

`@sentry-internal/test-utils` is packed as well. Test apps depend on its tarball directly
(`"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz"`), so after changing
test-utils, run `pnpm run build:tarball` again.

The E2E test script looks for test applications in the `test-applications` folder. These are standalone apps that use
our SDKs and can be used to verify their behavior.

Expand Down
8 changes: 6 additions & 2 deletions dev-packages/e2e-tests/lib/packedTarballUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ import { sync as globSync } from 'glob';
const E2E_TESTS_ROOT = path.resolve(__dirname, '..');
const REPOSITORY_ROOT = path.resolve(E2E_TESTS_ROOT, '../..');

// test-utils is not published, but test apps install it from its tarball too: with a `link:`, its dependencies would
// resolve from the monorepo's root `node_modules` instead of the app's.
export const TARBALL_PACKAGE_JSON_GLOB = '{packages/*,dev-packages/test-utils}/package.json';

/**
* Workspace @sentry and @sentry-internal packages that have a built tarball for the E2E version.
* @returns The names of the published Sentry tarball packages.
* @returns The names of the Sentry tarball packages.
*/
export function getPublishedSentryTarballPackageNames(): string[] {
const version = getE2eTestsPackageVersion();
const names: string[] = [];

for (const packageJsonPath of globSync('packages/*/package.json', {
for (const packageJsonPath of globSync(TARBALL_PACKAGE_JSON_GLOB, {
cwd: REPOSITORY_ROOT,
absolute: true,
})) {
Expand Down
8 changes: 4 additions & 4 deletions dev-packages/e2e-tests/lib/syncPackedTarballSymlinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as fs from 'fs';
import * as path from 'path';
import { sync as globSync } from 'glob';
import { packedSymlinkFilename, versionedTarballFilename } from './packedTarballUtils';
import { packedSymlinkFilename, TARBALL_PACKAGE_JSON_GLOB, versionedTarballFilename } from './packedTarballUtils';

const e2eTestsRoot = path.resolve(__dirname, '..');
const repositoryRoot = path.resolve(e2eTestsRoot, '../..');
Expand All @@ -13,7 +13,7 @@ function readJson<T>(filePath: string): T {
}

/**
* Ensures `packed/<name>-packed.tgz` symlinks point at the current versioned tarballs under `packages/*`.
* Ensures `packed/<name>-packed.tgz` symlinks point at the current versioned tarballs.
* Run after `pnpm run build:tarball` at the repo root (or from CI after restoring the tarball cache).
*/
export function syncPackedTarballSymlinks(): void {
Expand All @@ -28,7 +28,7 @@ export function syncPackedTarballSymlinks(): void {
fs.rmSync(path.join(packedDir, entry.name), { recursive: true, force: true });
}

const packageJsonPaths = globSync('packages/*/package.json', {
const packageJsonPaths = globSync(TARBALL_PACKAGE_JSON_GLOB, {
cwd: repositoryRoot,
absolute: true,
});
Expand Down Expand Up @@ -57,7 +57,7 @@ export function syncPackedTarballSymlinks(): void {

if (linked === 0) {
throw new Error(
`No packed tarballs found for version ${version} under packages/*/. Run "pnpm run build:tarball" at the repository root.`,
`No packed tarballs found for version ${version}. Run "pnpm run build:tarball" at the repository root.`,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@angular-devkit/build-angular": "^17.1.1",
"@angular/cli": "^17.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@angular-devkit/build-angular": "^18.0.0",
"@angular/cli": "^18.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@angular/compiler-cli": "^19.0.0",
"@playwright/test": "1.64.1",
"@sentry/conventions": "0.27.0",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/jasmine": "~5.1.0",
"http-server": "^14.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@angular/cli": "^20.0.0",
"@angular/compiler-cli": "^20.0.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/jasmine": "~5.1.0",
"http-server": "^14.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@angular/cli": "^21.0.0",
"@angular/compiler-cli": "^21.0.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/jasmine": "~5.1.0",
"http-server": "^14.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@angular/cli": "^22.0.0",
"@angular/compiler-cli": "^22.0.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
"@types/jasmine": "~5.1.0",
"http-server": "^14.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/node": "8.3.4",
"@playwright/test": "1.64.1",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@spotlightjs/astro": "2.1.6",
"astro": "4.16.19",
"typescript": "^5.5.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/cloudflare": "^12.6.12",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"@sentry/cloudflare": "file:../../packed/sentry-cloudflare-packed.tgz",
"astro": "^5.17.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/internal-helpers": "^0.4.2",
"@astrojs/node": "^9.0.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"astro": "^5.0.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@astrojs/cloudflare": "^13.0.2",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"@sentry/cloudflare": "file:../../packed/sentry-cloudflare-packed.tgz",
"astro": "^6.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^10.0.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"astro": "^6.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"astro": "^7.2.8"
},
"devDependencies": {
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/node": "^22.20.0"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@astrojs/node": "^11.1.4",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"astro": "^7.2.8",
"ioredis": "5.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@astrojs/node": "^11.1.4",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/astro": "file:../../packed/sentry-astro-packed.tgz",
"astro": "^7.2.8",
"ioredis": "5.10.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@aws-sdk/client-lambda": "^3.863.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/aws-serverless": "link:../../../../packages/aws-serverless/build/aws/dist-serverless/",
"aws-cdk-lib": "^2.210.0",
"constructs": "^10.4.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@aws-sdk/client-lambda": "^3.863.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/aws-serverless": "file:../../packed/sentry-aws-serverless-packed.tgz",
"aws-cdk-lib": "^2.210.0",
"constructs": "^10.4.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "~5.8.3",
"vite": "^7.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"concurrently": "^8.2.2"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "~5.8.3",
"vite": "^7.3.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/express": "^5.0.0",
"bun-types": "^1.2.9"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"bun-types": "^1.2.9"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@playwright/test": "1.64.1",
"@cloudflare/vite-plugin": "^1.47.0",
"@cloudflare/workers-types": "^5.20260727.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/node": "^26.1.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@cloudflare/vite-plugin": "^1.47.0",
"@cloudflare/workers-types": "^5.20260727.1",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/node": "^26.1.2",
"@types/ws": "^8.18.1",
"typescript": "~6.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@flue/cli": "2.0.5",
"@flue/vite": "2.0.5",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/node": "^24.0.0",
"sentry": "~0.44.1",
"typescript": "^5.5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"devDependencies": {
"@playwright/test": "1.64.1",
"@cloudflare/workers-types": "^4.20240725.0",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "^5.5.2",
"wrangler": "^4.61.0",
"ws": "^8.18.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@cloudflare/vite-plugin": "1.52.0",
"@cloudflare/workers-types": "^4.20260426.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "^5.5.2",
"vite": "7.3.5",
"wrangler": "^4.86.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@cloudflare/workers-types": "^4.20260426.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "^6.0.3",
"wrangler": "^4.86.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@cloudflare/workers-types": "^4.20240725.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"typescript": "^5.5.2",
"wrangler": "^4.61.0",
"ws": "^8.18.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@cloudflare/vite-plugin": "^1.35.0",
"@playwright/test": "1.64.1",
"@cloudflare/workers-types": "^4.20260629.0",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@types/node": "^24.12.4",
"typescript": "^5.5.2",
"vite": "7.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@cloudflare/vite-plugin": "1.57.2",
"@cloudflare/workers-types": "^4.20260426.0",
"@playwright/test": "1.64.1",
"@sentry-internal/test-utils": "link:../../../test-utils",
"@sentry-internal/test-utils": "file:../../packed/sentry-internal-test-utils-packed.tgz",
"@sentry/conventions": "0.27.0",
"typescript": "^5.5.2",
"vite": "7.3.5",
Expand Down
Loading
Loading