Skip to content

Commit be9ccc2

Browse files
committed
Merge branch 'develop' into aliu/launch-darkly-integration
2 parents 611df2c + 4ffc81a commit be9ccc2

File tree

320 files changed

+2501
-1422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+2501
-1422
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ env:
4444
${{ github.workspace }}/packages/*/build
4545
${{ github.workspace }}/packages/ember/*.d.ts
4646
${{ github.workspace }}/packages/gatsby/*.d.ts
47-
${{ github.workspace }}/packages/core/src/version.ts
4847
${{ github.workspace }}/packages/utils/cjs
4948
${{ github.workspace }}/packages/utils/esm
5049
@@ -801,7 +800,15 @@ jobs:
801800
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
802801
runs-on: ubuntu-20.04-large-js
803802
timeout-minutes: 15
803+
outputs:
804+
matrix: ${{ steps.matrix.outputs.matrix }}
805+
matrix-optional: ${{ steps.matrix-optional.outputs.matrix }}
804806
steps:
807+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
808+
uses: actions/checkout@v4
809+
if: github.event_name == 'pull_request'
810+
with:
811+
ref: ${{ github.event.pull_request.base.sha }}
805812
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
806813
uses: actions/checkout@v4
807814
with:
@@ -851,11 +858,21 @@ jobs:
851858
path: ${{ github.workspace }}/packages/*/*.tgz
852859
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
853860

861+
- name: Determine which E2E test applications should be run
862+
id: matrix
863+
run: yarn --silent ci:build-matrix --base=${{ (github.event_name == 'pull_request' && github.event.pull_request.base.sha) || '' }} >> $GITHUB_OUTPUT
864+
working-directory: dev-packages/e2e-tests
865+
866+
- name: Determine which optional E2E test applications should be run
867+
id: matrix-optional
868+
run: yarn --silent ci:build-matrix-optional --base=${{ (github.event_name == 'pull_request' && github.event.pull_request.base.sha) || '' }} >> $GITHUB_OUTPUT
869+
working-directory: dev-packages/e2e-tests
870+
854871
job_e2e_tests:
855872
name: E2E ${{ matrix.label || matrix.test-application }} Test
856873
# We need to add the `always()` check here because the previous step has this as well :(
857874
# See: https://github.com/actions/runner/issues/2205
858-
if: always() && needs.job_e2e_prepare.result == 'success'
875+
if: always() && needs.job_e2e_prepare.result == 'success' && needs.job_e2e_prepare.outputs.matrix != '{"include":[]}'
859876
needs: [job_get_metadata, job_build, job_e2e_prepare]
860877
runs-on: ubuntu-20.04
861878
timeout-minutes: 15
@@ -870,105 +887,7 @@ jobs:
870887
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
871888
strategy:
872889
fail-fast: false
873-
matrix:
874-
is_dependabot:
875-
- ${{ github.actor == 'dependabot[bot]' }}
876-
test-application:
877-
[
878-
'angular-17',
879-
'angular-18',
880-
'astro-4',
881-
'aws-lambda-layer-cjs',
882-
'aws-serverless-esm',
883-
'node-express',
884-
'create-react-app',
885-
'create-next-app',
886-
'create-remix-app',
887-
'create-remix-app-legacy',
888-
'create-remix-app-v2',
889-
'create-remix-app-v2-legacy',
890-
'create-remix-app-express',
891-
'create-remix-app-express-legacy',
892-
'create-remix-app-express-vite-dev',
893-
'default-browser',
894-
'node-express-esm-loader',
895-
'node-express-esm-preload',
896-
'node-express-esm-without-loader',
897-
'node-express-cjs-preload',
898-
'node-otel-sdk-node',
899-
'node-otel-custom-sampler',
900-
'node-otel-without-tracing',
901-
'ember-classic',
902-
'ember-embroider',
903-
'nextjs-app-dir',
904-
'nextjs-13',
905-
'nextjs-14',
906-
'nextjs-15',
907-
'nextjs-turbo',
908-
'nextjs-t3',
909-
'react-17',
910-
'react-19',
911-
'react-create-hash-router',
912-
'react-router-6-use-routes',
913-
'react-router-5',
914-
'react-router-6',
915-
'solid',
916-
'solidstart',
917-
'solidstart-spa',
918-
'svelte-5',
919-
'sveltekit',
920-
'sveltekit-2',
921-
'sveltekit-2-svelte-5',
922-
'sveltekit-2-twp',
923-
'tanstack-router',
924-
'generic-ts3.8',
925-
'node-fastify',
926-
'node-fastify-5',
927-
'node-hapi',
928-
'node-nestjs-basic',
929-
'node-nestjs-distributed-tracing',
930-
'nestjs-basic',
931-
'nestjs-8',
932-
'nestjs-distributed-tracing',
933-
'nestjs-with-submodules',
934-
'nestjs-with-submodules-decorator',
935-
'nestjs-basic-with-graphql',
936-
'nestjs-graphql',
937-
'node-exports-test-app',
938-
'node-koa',
939-
'node-connect',
940-
'nuxt-3',
941-
'nuxt-3-min',
942-
'nuxt-4',
943-
'vue-3',
944-
'webpack-4',
945-
'webpack-5'
946-
]
947-
build-command:
948-
- false
949-
label:
950-
- false
951-
# Add any variations of a test app here
952-
# You should provide an alternate build-command as well as a matching label
953-
include:
954-
- test-application: 'create-react-app'
955-
build-command: 'test:build-ts3.8'
956-
label: 'create-react-app (TS 3.8)'
957-
- test-application: 'react-router-6'
958-
build-command: 'test:build-ts3.8'
959-
label: 'react-router-6 (TS 3.8)'
960-
- test-application: 'create-next-app'
961-
build-command: 'test:build-13'
962-
label: 'create-next-app (next@13)'
963-
- test-application: 'nextjs-app-dir'
964-
build-command: 'test:build-13'
965-
label: 'nextjs-app-dir (next@13)'
966-
exclude:
967-
- is_dependabot: true
968-
test-application: 'cloudflare-astro'
969-
- is_dependabot: true
970-
test-application: 'cloudflare-workers'
971-
890+
matrix: ${{ fromJson(needs.job_e2e_prepare.outputs.matrix) }}
972891
steps:
973892
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
974893
uses: actions/checkout@v4
@@ -1069,6 +988,7 @@ jobs:
1069988
# See: https://github.com/actions/runner/issues/2205
1070989
if:
1071990
always() && needs.job_e2e_prepare.result == 'success' &&
991+
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' &&
1072992
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1073993
github.actor != 'dependabot[bot]'
1074994
needs: [job_get_metadata, job_build, job_e2e_prepare]
@@ -1085,58 +1005,7 @@ jobs:
10851005
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
10861006
strategy:
10871007
fail-fast: false
1088-
matrix:
1089-
test-application:
1090-
[
1091-
'cloudflare-astro',
1092-
'cloudflare-workers',
1093-
'react-send-to-sentry',
1094-
'node-express-send-to-sentry',
1095-
'debug-id-sourcemaps',
1096-
]
1097-
build-command:
1098-
- false
1099-
assert-command:
1100-
- false
1101-
label:
1102-
- false
1103-
include:
1104-
- test-application: 'create-remix-app'
1105-
assert-command: 'test:assert-sourcemaps'
1106-
label: 'create-remix-app (sourcemaps)'
1107-
- test-application: 'create-remix-app-legacy'
1108-
assert-command: 'test:assert-sourcemaps'
1109-
label: 'create-remix-app-legacy (sourcemaps)'
1110-
- test-application: 'nextjs-app-dir'
1111-
build-command: 'test:build-canary'
1112-
label: 'nextjs-app-dir (canary)'
1113-
- test-application: 'nextjs-app-dir'
1114-
build-command: 'test:build-latest'
1115-
label: 'nextjs-app-dir (latest)'
1116-
- test-application: 'nextjs-13'
1117-
build-command: 'test:build-canary'
1118-
label: 'nextjs-13 (canary)'
1119-
- test-application: 'nextjs-13'
1120-
build-command: 'test:build-latest'
1121-
label: 'nextjs-13 (latest)'
1122-
- test-application: 'nextjs-14'
1123-
build-command: 'test:build-canary'
1124-
label: 'nextjs-14 (canary)'
1125-
- test-application: 'nextjs-14'
1126-
build-command: 'test:build-latest'
1127-
label: 'nextjs-14 (latest)'
1128-
- test-application: 'nextjs-15'
1129-
build-command: 'test:build-canary'
1130-
label: 'nextjs-15 (canary)'
1131-
- test-application: 'nextjs-15'
1132-
build-command: 'test:build-latest'
1133-
label: 'nextjs-15 (latest)'
1134-
- test-application: 'nextjs-turbo'
1135-
build-command: 'test:build-canary'
1136-
label: 'nextjs-turbo (canary)'
1137-
- test-application: 'nextjs-turbo'
1138-
build-command: 'test:build-latest'
1139-
label: 'nextjs-turbo (latest)'
1008+
matrix: ${{ fromJson(needs.job_e2e_prepare.outputs.matrix-optional) }}
11401009

11411010
steps:
11421011
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})

.size-limit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = [
107107
path: 'packages/browser/build/npm/esm/index.js',
108108
import: createImport('init', 'feedbackAsyncIntegration'),
109109
gzip: true,
110-
limit: '33.1 KB',
110+
limit: '34 KB',
111111
},
112112
// React SDK (ESM)
113113
{
@@ -160,7 +160,7 @@ module.exports = [
160160
name: 'CDN Bundle (incl. Tracing)',
161161
path: createCDNPath('bundle.tracing.min.js'),
162162
gzip: true,
163-
limit: '38 KB',
163+
limit: '39 KB',
164164
},
165165
{
166166
name: 'CDN Bundle (incl. Tracing, Replay)',

dev-packages/browser-integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"dependencies": {
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
45-
"@sentry-internal/rrweb": "2.11.0",
45+
"@sentry-internal/rrweb": "2.29.0",
4646
"@sentry/browser": "8.38.0",
4747
"axios": "1.7.7",
4848
"babel-loader": "^8.2.2",

dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ ${changedPaths.join('\n')}
100100
* Returns how many time one test should run based on the chosen mode and a bunch of heuristics
101101
*/
102102
function getPerTestRunCount(testPaths: string[]) {
103-
if (process.env.TEST_RUN_COUNT === 'AUTO' && testPaths.length > 0) {
103+
if ((!process.env.TEST_RUN_COUNT || process.env.TEST_RUN_COUNT === 'AUTO') && testPaths.length > 0) {
104104
// Run everything up to 100x, assuming that total runtime is less than 60min.
105105
// We assume an average runtime of 3s per test, times 4 (for different browsers) = 12s per detected testPaths
106106
// We want to keep overall runtime under 30min

dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../uti
55

66
sentryTest(
77
'should add source context lines around stack frames from errors in Html inline JS',
8-
async ({ getLocalTestPath, page, browserName }) => {
8+
async ({ getLocalTestUrl, page, browserName }) => {
99
if (browserName === 'webkit') {
1010
// The error we're throwing in this test is thrown as "Script error." in Webkit.
1111
// We filter "Script error." out by default in `InboundFilters`.
@@ -15,9 +15,10 @@ sentryTest(
1515
sentryTest.skip();
1616
}
1717

18-
const url = await getLocalTestPath({ testDir: __dirname });
18+
const url = await getLocalTestUrl({ testDir: __dirname });
1919

2020
const eventReqPromise = waitForErrorRequestOnUrl(page, url);
21+
await page.waitForFunction('window.Sentry');
2122

2223
const clickPromise = page.locator('#inline-error-btn').click();
2324

dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { expect } from '@playwright/test';
33
import { sentryTest } from '../../../../utils/fixtures';
44
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
55

6-
sentryTest('should not add source context lines to errors from script files', async ({ getLocalTestPath, page }) => {
7-
const url = await getLocalTestPath({ testDir: __dirname });
6+
sentryTest('should not add source context lines to errors from script files', async ({ getLocalTestUrl, page }) => {
7+
const url = await getLocalTestUrl({ testDir: __dirname });
88

99
const eventReqPromise = waitForErrorRequestOnUrl(page, url);
1010

dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../uti
55

66
sentryTest(
77
'should add source context lines around stack frames from errors in Html script tags',
8-
async ({ getLocalTestPath, page, browserName }) => {
8+
async ({ getLocalTestUrl, page, browserName }) => {
99
if (browserName === 'webkit') {
1010
// The error we're throwing in this test is thrown as "Script error." in Webkit.
1111
// We filter "Script error." out by default in `InboundFilters`.
@@ -15,9 +15,10 @@ sentryTest(
1515
sentryTest.skip();
1616
}
1717

18-
const url = await getLocalTestPath({ testDir: __dirname });
18+
const url = await getLocalTestUrl({ testDir: __dirname });
1919

2020
const eventReqPromise = waitForErrorRequestOnUrl(page, url);
21+
await page.waitForFunction('window.Sentry');
2122

2223
const clickPromise = page.locator('#inline-error-btn').click();
2324

dev-packages/browser-integration-tests/suites/integrations/globalHandlers/fetchStackTrace/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { Event } from '@sentry/types';
44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers';
66

7-
sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestPath, page }) => {
8-
const url = await getLocalTestPath({ testDir: __dirname });
7+
sentryTest('should create errors with stack traces for failing fetch calls', async ({ getLocalTestUrl, page }) => {
8+
const url = await getLocalTestUrl({ testDir: __dirname });
99

1010
const envelopes = await getMultipleSentryEnvelopeRequests<Event>(page, 3, { url, timeout: 10000 });
1111
const errorEvent = envelopes.find(event => !event.type)!;

dev-packages/browser-integration-tests/suites/integrations/httpContext/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { Event } from '@sentry/types';
44
import { sentryTest } from '../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers';
66

7-
sentryTest('httpContextIntegration captures user-agent and referrer', async ({ getLocalTestPath, page }) => {
8-
const url = await getLocalTestPath({ testDir: __dirname });
7+
sentryTest('httpContextIntegration captures user-agent and referrer', async ({ getLocalTestUrl, page }) => {
8+
const url = await getLocalTestUrl({ testDir: __dirname });
99

1010
const errorEventPromise = getFirstSentryEnvelopeRequest<Event>(page);
1111

dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
66

77
sentryTest(
88
'should assign request and response context from a failed 500 XHR request',
9-
async ({ getLocalTestPath, page }) => {
10-
const url = await getLocalTestPath({ testDir: __dirname });
9+
async ({ getLocalTestUrl, page }) => {
10+
const url = await getLocalTestUrl({ testDir: __dirname });
1111

1212
await page.route('**/foo', route => {
1313
return route.fulfill({

0 commit comments

Comments
 (0)