Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
f109026
Merge pull request #26784 from getsentry/master
github-actions[bot] Nov 23, 2026
3e7384e
feat(core): Share the source map option warnings with the SDKs (#26626)
timfish Nov 23, 2026
e7a2b0f
feat(gatsby): Support `sourcemaps.upload`, `injectDebugIds` and `dele…
timfish Nov 23, 2026
dabbe03
feat(nitro): Support `sourcemaps.upload`, `injectDebugIds` and `delet…
timfish Nov 23, 2026
bf67c5c
feat(astro): Support `sourcemaps.upload`, `injectDebugIds` and `delet…
timfish Nov 23, 2026
84df128
feat(nuxt): Support `sourcemaps.upload`, `injectDebugIds` and `delete…
timfish Nov 23, 2026
f3de4d6
perf(ci): Use four workers for Next.js E2E tests (#26763)
nicohrubec Nov 24, 2026
a0df3cb
fix(cloudflare): wrap Worker entrypoints reached through ctx.exports …
JPeer264 Nov 24, 2026
41cb21d
chore(deps): Bump `@sentry/conventions` to 0.36.0 (#26796)
sentry-junior[bot] Nov 24, 2026
e9013e0
fix(deno): Fill module and trim trailing context line in stack frames…
sentry-junior[bot] Nov 24, 2026
33ae1de
ref(core): Drop the internal prefix from tunnel exports (#26746)
sentry-junior[bot] Nov 24, 2026
e83f5db
chore(e2e): Bump non-critical e2e test app dependencies (#26797)
sentry-junior[bot] Nov 24, 2026
9a0dabb
fix(bundler-plugins): Use forward slashes in rewritten source map sou…
chargome Nov 24, 2026
af2939e
fix(solidstart): Ignore build output spans with span streaming (#26782)
s1gr1d Nov 24, 2026
6f65ab3
fix: Warn about conflicting source map options that the SDKs apply th…
timfish Nov 24, 2026
638a964
feat(tanstackstart-react): Support `sourcemaps.upload`, `injectDebugI…
timfish Nov 24, 2026
c566bd2
fix(feedback): Render feedback widget without innerHTML for Trusted T…
msonnb Nov 24, 2026
6daef45
feat(server-utils): Instrument the Vercel AI experimental_extract cha…
sentry-junior[bot] Nov 24, 2026
93c50e1
perf(ci): Build Lambda layers within E2E jobs (#26804)
nicohrubec Nov 24, 2026
9bad320
fix(nuxt): Ignore build output spans with span streaming (#26781)
s1gr1d Nov 24, 2026
f77451a
feat(nitro): Add the orchestrion plugin to the server build (#26799)
sentry-junior[bot] Nov 24, 2026
b7880bd
feat(cloudflare): Send the trace to the browser in a Server-Timing he…
chargome Nov 24, 2026
ebe27ba
feat(solid): Continue the server trace in the pageload on Cloudflare …
chargome Nov 24, 2026
d6b54ed
perf(ci): Split large integration suites and use six Deno shards (#26…
nicohrubec Nov 24, 2026
4300c0c
test(solid): Check sentryVitePlugin with the Solid 2 server build (#2…
chargome Nov 24, 2026
b365327
feat(hono): Support Hono 5 (#26813)
s1gr1d Nov 24, 2026
1f32728
test(e2e): Add Hono 5 E2E app (#26814)
s1gr1d Nov 24, 2026
b05e99a
fix(nuxt): Percent-encode public file paths for the span filter (#26817)
s1gr1d Nov 24, 2026
92aed06
fix(server-utils): Skip MongoDB statement serialization when the span…
JPeer264 Nov 24, 2026
b365f05
feat(effect)!: Rename exports and add layers for tracing and logs (#2…
JPeer264 Nov 24, 2026
cc62d8e
perf(ci): Use three WebKit browser integration shards (#26829)
nicohrubec Nov 24, 2026
d78753f
fix(hono): Skip middleware spans for Hono 5 error and not-found handl…
s1gr1d Nov 24, 2026
21a3c7c
perf(ci): Separate Next.js cacheComponents production and development…
nicohrubec Nov 24, 2026
d972925
ci: Run repo script tests (#26832)
andreiborza Nov 24, 2026
e7a1a76
ci: Key Playwright browser cache by runner architecture (#26833)
andreiborza Nov 24, 2026
316ebfe
Merge pull request #26834 from getsentry/awad/sdk-config-browser-runtime
logaretm Nov 24, 2026
dd941c6
chore(deps): Bump rrweb to 2.46.2
sentry-junior[bot] Nov 24, 2026
3abd941
fix(remix, tanstackstart-react): Let a user's `filesToDeleteAfterUplo…
timfish Nov 24, 2026
cae3ec7
feat(nextjs): Support `sourcemaps.upload`, `injectDebugIds` and `dele…
timfish Nov 24, 2026
348db39
Merge pull request #26837 from getsentry/chore/bump-rrweb-2.46.2-retry
gggritso Nov 24, 2026
69dbad1
feat(solidstart): Support `sourcemaps.upload`, `injectDebugIds` and `…
timfish Nov 24, 2026
992b5ba
test(e2e): Run fastify-5 on Bun and Deno (#26828)
JPeer264 Nov 25, 2026
3a5de4a
feat(nuxt): Set up Cloudflare from `sentry.cloudflare.config.ts` (#26…
JPeer264 Nov 25, 2026
96f059f
test(e2e): Set up the nuxt-4 Cloudflare variant from `sentry.cloudfla…
JPeer264 Nov 25, 2026
6034233
test(e2e): Run nuxt-5 on Bun, Deno and Cloudflare (#26756)
JPeer264 Nov 25, 2026
2bd9b75
feat(node): Improve module detection in `modulesIntegration` (#26637)
sentry-junior[bot] Nov 25, 2026
15956ef
ci(size-limit): Simplify the size-limit action (#26778)
sentry-junior[bot] Nov 25, 2026
8187094
fix(test): Stop waiting for a port when a scenario exits (#26846)
nicohrubec Nov 25, 2026
cee40e6
fix(effect): Report a failure once when the Sentry layer is provided …
JPeer264 Nov 25, 2026
a1fd756
feat(nuxt): Capture errors caught by <NuxtErrorBoundary> during SSR (…
pranav514 Nov 25, 2026
0d64aab
chore(lint): Forbid non-null assertions in SDK source (#26856)
sentry-junior[bot] Nov 25, 2026
ca28546
chore: Add external contributor to CHANGELOG.md (#26857)
javascript-sdk-gitflow[bot] Nov 25, 2026
d51eabe
ref(core): Drop unused internal exports and rename log/metric capture…
sentry-junior[bot] Nov 25, 2026
06fdfe2
test(e2e): Shard the nextjs-16 canary webpack job (#26853)
JPeer264 Nov 25, 2026
3069940
chore(lint): Move mechanical Bugbot rules to lint and the test runner…
sentry-junior[bot] Nov 25, 2026
7e87b82
fix(langchain): Record finish reasons for the OpenAI Responses API (#…
sentry-junior[bot] Nov 25, 2026
b06ca66
test(bundler-plugins): Cover source map upload for file names with gl…
andreiborza Nov 25, 2026
74dc75a
feat(astro): Use the Bun and Deno integrations when Astro runs on Bun…
JPeer264 Nov 25, 2026
300e09c
fix(astro): Report the Astro SDK name with the Cloudflare Vite plugin…
JPeer264 Nov 25, 2026
33166b1
test(e2e): Run astro-6 on Bun, Deno and Cloudflare (#26845)
JPeer264 Nov 25, 2026
fc11404
chore(lint): Require a DEBUG_BUILD gate on debug logs in browser-faci…
sentry-junior[bot] Nov 25, 2026
b7c65c3
chore(lint): Point no-unguarded-span-apis message back at @sentry/cor…
sentry-junior[bot] Nov 25, 2026
40fb1a8
chore: Keep Bugbot rule notes next to the code (#26875)
andreiborza Nov 25, 2026
910d793
ci(e2e): Only give secrets to E2E test apps that need them (#26869)
s1gr1d Nov 25, 2026
47dd19c
test(e2e): Isolate the react-router-7 instrumentation double-instrume…
sentry-junior[bot] Nov 25, 2026
5b76329
test(node): Check docker-compose healthchecks in a static test (#26884)
sentry-junior[bot] Nov 25, 2026
dbfdecf
feat(server-utils): normalize Vercel AI `gen_ai.extract` spans (#26831)
andreiborza Nov 25, 2026
2e525b2
fix(nextjs, remix, sveltekit, gatsby): Don't turn on source maps with…
timfish Nov 25, 2026
ab44c18
fix(feedback): Rename `*.css.ts` style modules to `*.styles.ts` (#26842)
logaretm Nov 25, 2026
621087c
chore(deps): Bump rrweb to 2.47.0 (#26883)
sentry-junior[bot] Nov 25, 2026
736e6ff
fix(core): Exclude environment from SDK configuration reports (#26835)
logaretm Nov 25, 2026
57ff420
fix(core): Report non-finite numbers and initialScope values as place…
logaretm Nov 25, 2026
741b84e
meta(changelog): Update changelog for 11.18.0
nicohrubec Nov 25, 2026
a74f369
meta(changelog): Preserve existing important release entries
nicohrubec Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .cursor/BUGBOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Keep reviews high-signal. Prefer actionable, high-confidence findings over specu
### Security Vulnerabilities

- Exposed **real** secrets, API keys, tokens, or credentials in production code, comments, logs, or committed configs. Do **not** flag test fixtures, unit/integration/E2E helpers, or docs/examples that use obviously fake / placeholder DSNs and credentials (bogus DSNs in tests are expected).
- Unsafe use of `eval()`, `Function()`, or `innerHTML`
- Unsafe regular expressions that could cause ReDoS attacks
- `JSON.stringify` output that goes into generated code (bundler plugins, loaders, virtual modules, `define` values). Use `stringifyForCodeInjection` from `@sentry/core` instead. It escapes `<`, `>`, U+2028 and U+2029, so the code stays safe when inlined in a `<script>` element. Do not flag log messages, boolean `define` values, or other output that never reaches generated code.
- Sensitive data collection must go through the SDK's `dataCollection` options (and helpers like `filterCollectedUrl` / `filterCollectedUrlQuery`) where applicable. Flag new instrumentation that attaches request/response bodies, cookies, headers, URL query params, user info, DB query data, GraphQL variables, GenAI I/O, or similar without honoring the relevant `dataCollection.*` knobs — or that hard-codes collection on when those options would disable or filter it. Prefer linking reviewers to the existing URL-attribute filtering rules below rather than inventing parallel guidance.
Expand Down Expand Up @@ -65,8 +64,6 @@ Keep reviews high-signal. Prefer actionable, high-confidence findings over specu
- Generally, errors in instrumented code should be allowed to bubble up so the end user can handle them. If they remain unhandled, they will eventually be captured by Sentry through the SDK's global error handlers — so instrumentation code should typically **not** call `captureException` itself.
- Only consider calling `captureException` if the instrumentation prevents errors from bubbling up (e.g. by swallowing them in a `try/catch` or an error event listener). Doing so is generally discouraged — prefer to let the error propagate instead.
- Flag any instrumentation that swallows errors without calling `captureException`, and any instrumentation that calls `captureException` even though the error would still bubble up to the user (which causes double-reporting).
- When calling `generateInstrumentationOnce`, the passed in name MUST match the name of the integration that uses it. If there are multiple instrumentations, they need to follow the pattern `${INSTRUMENTATION_NAME}.some-suffix`.
- When SDK source code ends up in browser SDK output (ie. core/browser packages), flag any unguarded `debug.log` / `debug.warn` / `debug.error` calls. The convention is the short-circuit form `DEBUG_BUILD && debug.log(...)` (not `if (DEBUG_BUILD) { ... }` wrapping). Without the `DEBUG_BUILD` gate the message text ships in production bundles and bloats bundle size.
- Flag direct `console.log` / `console.warn` / `console.error` / `console.info` / `console.debug` calls in SDK source. The accepted patterns are:
- The SDK's `debug` logger (gated with `DEBUG_BUILD && debug.*`) for SDK-internal diagnostics.
- `consoleSandbox(() => { console.warn(...) })` for intentional user-facing warnings (e.g. init-time misconfiguration messages). The `consoleSandbox` wrapper prevents the SDK's own console instrumentation from intercepting the call. Bare `console.*` calls outside very early init paths (e.g. before the logger is available) should be flagged.
Expand Down Expand Up @@ -110,8 +107,6 @@ Keep reviews high-signal. Prefer actionable, high-confidence findings over specu
modules, or setup hooks while preserving isolation and mock order.
Preserve imports whose evaluation timing is itself being tested.
Only flag concrete avoidable loading, not dynamic imports in general.
- Flag usage of `getFirstEnvelope*`, `getMultipleEnvelope*` or related test helpers in E2E tests. These are NOT reliable anymore. Instead suggest helpers like `waitForTransaction`, `waitForError`, `waitForSpans`, etc.
- Flag any new or modified `docker-compose.yml` under `dev-packages/node-integration-tests/suites/` where a service does not define a `healthcheck:`. The runner uses `docker compose up --wait` and relies on healthchecks to know when services are actually ready; without one the test will race the service's startup.
- Flag new Cloudflare tests that wrap the worker by hand with `withSentry`, `instrumentDurableObjectWithSentry`, `instrumentAgentWithSentry` or `instrumentWorkflowWithSentry`. This covers new suites under `dev-packages/cloudflare-integration-tests/suites/`, new E2E apps under `dev-packages/e2e-tests/test-applications/` that run on Cloudflare, and new Cloudflare variants of existing E2E apps (an entry in `sentryTest.variants` of the app's `package.json`, for example `hono-4 (cloudflare)`). App names do not always start with `cloudflare-`. Recommend the Sentry Cloudflare Vite plugin instead: `plugins: [cloudflare(), sentryCloudflareVitePlugin()]` in `vite.config.*` (`sentryCloudflareVitePlugin` from `@sentry/cloudflare/vite`), and the SDK options in an `instrument.server.ts` next to the worker entry that default-exports `defineCloudflareOptions(...)`. Do not flag tests whose purpose is to test one of these wrappers, or apps that do not build with Vite (for example Next.js on OpenNext).

## Platform-safe code
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
path: |
~/.cache/ms-playwright
# Bump the iteration when bumping runner images to use a new cache
key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }}
key: playwright-${{ runner.os }}-${{ runner.arch }}-iteration-1-${{ steps.playwright-version.outputs.version }}

# We always install all browsers, if uncached
# `npx` runs outside the repo, so it can't pick up a `playwright` that a parallel `pnpm install` is still linking.
Expand Down Expand Up @@ -146,4 +146,4 @@ runs:
path: |
~/.cache/ms-playwright
# Bump the iteration when bumping runner images to use a new cache
key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }}
key: playwright-${{ runner.os }}-${{ runner.arch }}-iteration-1-${{ steps.playwright-version.outputs.version }}
20 changes: 19 additions & 1 deletion .github/actions/prepare-e2e-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ inputs:
deno-version:
description: 'The Deno version to install, if the application needs Deno.'
default: 'v2.8.3'
build-lambda-layer:
description: 'Build the Lambda layer locally from the central SDK build instead of downloading its ZIP.'
default: 'false'
dependency-cache-key:
description: 'Workspace dependency cache key, required when building the Lambda layer locally.'
default: ''
artifacts-run-id:
description: 'The workflow run that uploaded the tarball artifacts. Defaults to the current run.'
default: ''
Expand Down Expand Up @@ -50,6 +56,18 @@ runs:
- name: Install pnpm
uses: ./.github/actions/install-pnpm

- name: Restore SDK build and dependencies for Lambda layer
if: inputs.build-lambda-layer == 'true'
uses: ./.github/actions/restore-cache
with:
dependency_cache_key: ${{ inputs.dependency-cache-key }}

- name: Build Lambda layer locally
if: inputs.build-lambda-layer == 'true'
# The central build already compiled the SDK; call the package script without rerunning Nx dependencies.
run: pnpm --filter @sentry/aws-serverless run build:layer
shell: bash

# upload-artifact strips the path through the first `*`, so the tarballs are stored as <pkg>/*.tgz and have to be
# downloaded into packages/.
- name: Restore tarball artifacts
Expand All @@ -69,7 +87,7 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Restore build layer artifacts
if: inputs.test-application == 'aws-serverless-layer'
if: inputs.test-application == 'aws-serverless-layer' && inputs.build-lambda-layer != 'true'
uses: actions/download-artifact@v8
with:
name: build-layer-output
Expand Down
87 changes: 74 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ jobs:
e2e-matrix-1: ${{ steps.matrix.outputs.matrix-1 }}
e2e-matrix-2: ${{ steps.matrix.outputs.matrix-2 }}
e2e-matrix-aws-layer: ${{ steps.matrix.outputs.matrix-aws-layer }}
e2e-matrix-with-secrets: ${{ steps.matrix.outputs.matrix-with-secrets }}
e2e-matrix-optional: ${{ steps.matrix-optional.outputs.matrix }}
e2e-matrix-optional-without-secrets: ${{ steps.matrix-optional.outputs.matrix-without-secrets }}

job_build_layer:
name: Build Lambda layer
needs: [job_get_metadata, job_build]
if:
needs.job_build.outputs.changed_aws_serverless == 'true' || contains(needs.job_build.outputs.e2e-matrix-aws-layer,
'aws-serverless-layer') || github.event_name != 'pull_request'
if: needs.job_get_metadata.outputs.is_release == 'true'
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
uses: ./dev-packages/size-limit-gh-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Only run comparison against develop if this is a PR
# Only compare on PRs. Other runs only store their results as a baseline.
comparison_branch: ${{ (github.event_name == 'pull_request' && github.base_ref) || ''}}

job_lint:
Expand Down Expand Up @@ -349,6 +349,8 @@ jobs:
echo "::error::All @playwright/test dependencies must be pinned to $version (from @sentry-internal/test-utils)."
exit 1
fi
- name: Test repo scripts
run: pnpm run test:scripts

job_check_lockfile:
name: Check lockfile
Expand Down Expand Up @@ -626,11 +628,15 @@ jobs:
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'webkit'
shard: 1
shards: 2
shards: 3
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'webkit'
shard: 2
shards: 2
shards: 3
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'webkit'
shard: 3
shards: 3
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: 'firefox'
- bundle: esm
Expand Down Expand Up @@ -1011,15 +1017,15 @@ jobs:
run: pnpm run test --shard=${{ matrix.shard }}/6

job_deno_integration_tests:
name: Deno Integration Tests (${{ matrix.shard }}/4)
name: Deno Integration Tests (${{ matrix.shard }}/6)
needs: [job_get_metadata, job_build]
if: needs.job_build.outputs.changed_deno_integration == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-24.04-arm
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
shard: [1, 2, 3, 4, 5, 6]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v7
Expand Down Expand Up @@ -1048,7 +1054,7 @@ jobs:
- name: Run shared Node integration tests
working-directory: dev-packages/deno-integration-tests
# Tedious runs in the dedicated SQL Server job because its database container requires x86.
run: pnpm run test:node-suites --shard=${{ matrix.shard }}/4 --exclude '**/tracing/tedious/**'
run: pnpm run test:node-suites --shard=${{ matrix.shard }}/6 --exclude '**/tracing/tedious/**'

# GitHub Actions allows at most 256 jobs in one matrix, so the E2E tests are split into two jobs that share `env`
# and `steps`.
Expand Down Expand Up @@ -1084,6 +1090,8 @@ jobs:
uses: ./.github/actions/prepare-e2e-test
with:
test-application: ${{ matrix.test-application }}
build-lambda-layer: ${{ matrix.test-application == 'aws-serverless-layer' }}
dependency-cache-key: ${{ needs.job_build.outputs.dependency_cache_key }}
runtime: ${{ matrix.runtime }}
bun-version: ${{ matrix.bun-version }}
deno-version: ${{ matrix.deno-version }}
Expand Down Expand Up @@ -1146,10 +1154,10 @@ jobs:

job_e2e_aws_layer_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
needs: [job_get_metadata, job_build, job_build_layer]
needs: [job_get_metadata, job_build]
if: >-
always() && needs.job_build.result == 'success' && needs.job_build_layer.result == 'success' &&
needs.job_build.outputs.e2e-matrix-aws-layer != '{"include":[]}'
always() && needs.job_build.result == 'success' && needs.job_build.outputs.e2e-matrix-aws-layer !=
'{"include":[]}'
runs-on: ubuntu-24.04
timeout-minutes: 15
env: *e2e-env
Expand All @@ -1158,12 +1166,47 @@ jobs:
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix-aws-layer) }}
steps: *e2e-steps

# PRs from forks and Dependabot get no secrets, so they skip these jobs. Release branches skip them too, so that an
# outage of an external API cannot block a release.
job_e2e_tests_with_secrets:
name: E2E ${{ matrix.label || matrix.test-application }} Test
if:
always() && needs.job_get_metadata.outputs.is_release != 'true' && needs.job_build.result == 'success' &&
needs.job_build.outputs.e2e-matrix-with-secrets != '{"include":[]}' && (github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]'
needs: [job_get_metadata, job_build]
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
# Keep the secrets the same as in optional-e2e.yml.
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
E2E_OPENROUTER_API_KEY: ${{ secrets.E2E_OPENROUTER_API_KEY }}
E2E_OPENAI_DECISIONS_API_KEY:
${{ matrix.test-application == 'node-openai-decisions' && secrets.E2E_OPENAI_DECISIONS_API_KEY || '' }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
RUNTIME: ${{ matrix.runtime }}
SENTRY_E2E_TEST_SHARD: ${{ matrix.test-shard }}
pnpm_config_verify_deps_before_run: 'false'
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix-with-secrets) }}
steps: *e2e-steps

# - We skip optional tests on release branches
# - The tests run in optional-e2e.yml, so their failures do not mark the PR as failed. This job only waits for
# them. optional-e2e.yml reports the results in a PR comment.
job_optional_e2e_tests:
name: E2E Tests (optional)
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
# A PR from a fork cannot dispatch optional-e2e.yml, see job_optional_e2e_tests_without_secrets.
if:
always() && needs.job_get_metadata.outputs.is_release != 'true' && needs.job_build.result == 'success' &&
needs.job_build.outputs.e2e-matrix-optional != '{"include":[]}' && (github.event_name != 'pull_request' ||
Expand Down Expand Up @@ -1194,6 +1237,23 @@ jobs:
commit: ${{ env.HEAD_COMMIT }}
matrix: ${{ needs.job_build.outputs.e2e-matrix-optional }}

job_optional_e2e_tests_without_secrets:
name: E2E ${{ matrix.label || matrix.test-application }} Test (optional)
if:
always() && needs.job_get_metadata.outputs.is_release != 'true' && needs.job_build.result == 'success' &&
needs.job_build.outputs.e2e-matrix-optional-without-secrets != '{"include":[]}' && github.event_name ==
'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
needs: [job_get_metadata, job_build]
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
env: *e2e-env
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix-optional-without-secrets) }}
steps: *e2e-steps

job_required_jobs_passed:
name: All required jobs passed or were skipped
needs:
Expand All @@ -1216,6 +1276,7 @@ jobs:
job_e2e_tests_1,
job_e2e_tests_2,
job_e2e_aws_layer_tests,
job_e2e_tests_with_secrets,
job_artifacts,
job_lint,
job_check_lockfile,
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/optional-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,23 @@ jobs:
contents: read
# To download the artifacts of the build.yml run
actions: read
# Keep the secrets the same as in job_e2e_tests_with_secrets (build.yml).
env:
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_AUTH_TOKEN: ${{ matrix.needs-secrets && secrets.E2E_TEST_AUTH_TOKEN || '' }}
E2E_TEST_DSN: ${{ matrix.needs-secrets && secrets.E2E_TEST_DSN || 'https://username@domain/123' }}
# Needed because some apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
NEXT_PUBLIC_E2E_TEST_DSN: ${{ matrix.needs-secrets && secrets.E2E_TEST_DSN || 'https://username@domain/123' }}
PUBLIC_E2E_TEST_DSN: ${{ matrix.needs-secrets && secrets.E2E_TEST_DSN || 'https://username@domain/123' }}
REACT_APP_E2E_TEST_DSN: ${{ matrix.needs-secrets && secrets.E2E_TEST_DSN || 'https://username@domain/123' }}
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
E2E_OPENROUTER_API_KEY: ${{ secrets.E2E_OPENROUTER_API_KEY }}
E2E_OPENROUTER_API_KEY: ${{ matrix.needs-secrets && secrets.E2E_OPENROUTER_API_KEY || '' }}
# Only this app talks to OpenAI directly (OpenRouter has no Decisions route), so only it gets the key.
E2E_OPENAI_DECISIONS_API_KEY:
${{ matrix.test-application == 'node-openai-decisions' && secrets.E2E_OPENAI_DECISIONS_API_KEY || '' }}
# Used by test apps that deploy a real Cloudflare Worker, e.g. cloudflare-workers-send-to-sentry
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ matrix.needs-secrets && secrets.CLOUDFLARE_API_TOKEN || '' }}
CLOUDFLARE_ACCOUNT_ID: ${{ matrix.needs-secrets && secrets.CLOUDFLARE_ACCOUNT_ID || '' }}
# Keeps the Worker name at `<prefix>-pr-<number>`, which the cleanup-e2e-workers workflow deletes
E2E_PR_NUMBER: ${{ inputs.pr_number }}
# The `runtime` of a runtime variant, see dev-packages/e2e-tests/README.md
Expand Down
13 changes: 9 additions & 4 deletions .oxlintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,18 @@
// Type-only imports are erased at build time, so they cannot cause load-order bugs.
"files": ["**/src/**"],
"rules": {
"import/no-cycle": ["error", { "ignoreTypes": true }]
"import/no-cycle": ["error", { "ignoreTypes": true }],
"typescript/no-non-null-assertion": "error"
}
},
{
// The rule itself decides which files are browser-facing (see `no-unguarded-span-apis.js`);
// The rules themselves decide which files are browser-facing (see `utils/browser-facing.js`);
// oxlint resolves `files` globs relative to each package's own config, so scoping it to
// individual packages here is not possible.
"files": ["**/src/**/*.ts", "**/src/**/*.tsx", "**/addon/**/*.ts"],
"rules": {
"sdk/no-unguarded-span-apis": "error"
"sdk/no-unguarded-span-apis": "error",
"sdk/no-unguarded-debug-logs": "error"
}
},
{
Expand Down Expand Up @@ -254,7 +256,10 @@
{
"files": ["**/src/**"],
"rules": {
"no-restricted-globals": ["error", "window", "document", "location", "navigator"]
"no-restricted-globals": ["error", "window", "document", "location", "navigator"],
"no-eval": "error",
"no-new-func": "error",
"sdk/no-unsafe-html-writes": "error"
}
},
{
Expand Down
Loading
Loading