Skip to content

Commit 5994ebc

Browse files
authored
Merge branch 'develop' into feat/cloudflare-think-e2e
2 parents 75805e3 + 378cccb commit 5994ebc

294 files changed

Lines changed: 8171 additions & 1298 deletions

File tree

Some content is hidden

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

‎.agents/skills/add-ai-integration/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ What the reference files won't tell you:
5858
- [ ] Instrumentation in `src/ai/`, integration in `src/integrations/`, registered in `getTracingIntegrations()` (LangChain first)
5959
- [ ] Exported from `packages/server-utils/src/index.ts`, re-exported from the supported runtime packages
6060
- [ ] E2E tests in `dev-packages/node-integration-tests/suites/tracing/{provider}/` (and `cloudflare-integration-tests/` if supported)
61+
- [ ] The new suite passes on the other runtimes that run the Node suites, or is excluded there (see "Other Runtimes" in `dev-packages/node-integration-tests/README.md`)
6162
- [ ] Ops and attributes from `@sentry/conventions`, op derived via `getGenAiSpanOp()`
6263
- [ ] Recording gated on `resolveAIRecordingOptions()`; no truncation, no token rollup
6364
- [ ] JSDoc names the channels subscribed to, the supported SDK versions, and — for Pattern 2 — that it requires the Sentry runtime hook or bundler plugin

‎.agents/skills/vendor-otel/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ grep "import.*from '" <file> | grep -v "@opentelemetry\|'\./\|@sentry\|'util'\|'
4343

4444
Check test coverage and report gaps:
4545

46-
- Integration tests: `dev-packages/node-integration-tests/suites/tracing/<name>/`
46+
- Integration tests: `dev-packages/node-integration-tests/suites/tracing/<name>/`. Other runtimes run these
47+
suites too; see "Other Runtimes" in `dev-packages/node-integration-tests/README.md`.
4748
- E2E tests: `dev-packages/e2e-tests/test-applications/node-<name>/`
4849
- Unit tests: `packages/node/test/integrations/tracing/<name>.test.ts`
4950

‎.agents/skills/write-tests/SKILL.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,9 @@ describe('patchRoute', () => {
337337
Node integration tests (`dev-packages/node-integration-tests/`) use `createEsmAndCjsTests` to
338338
run a real Node scenario file and assert on captured Sentry envelopes.
339339

340+
Other runtimes run these suites too. A new suite must pass there or be excluded; see "Other
341+
Runtimes" in `dev-packages/node-integration-tests/README.md`.
342+
340343
### Minimize `test()` calls — each one spawns a separate Node process
341344

342345
**This is the opposite of the Playwright rule.** In Playwright, each `test()` is cheap — use

‎.github/CODEOWNERS‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
/dev-packages/browser-integration-tests/ @getsentry/team-javascript-sdks-browser
99

1010
# Node/server runtimes and related packages
11-
# TEMP: whole JS SDK team reviews orchestrion work; revert to team-javascript-sdks-server after
12-
/packages/node/ @getsentry/team-javascript-sdks
13-
/packages/server-runtime-injection/ @getsentry/team-javascript-sdks
14-
/packages/server-utils/ @getsentry/team-javascript-sdks
11+
/packages/node/ @getsentry/team-javascript-sdks-server
12+
/packages/server-runtime-injection/ @getsentry/team-javascript-sdks-server
13+
/packages/server-utils/ @getsentry/team-javascript-sdks-server
1514
/packages/node-native/ @getsentry/team-javascript-sdks-server
1615
/packages/profiling-node/ @getsentry/team-javascript-sdks-server
1716
/packages/opentelemetry/ @getsentry/team-javascript-sdks-server

‎.github/FLAKY_CI_FAILURE_TEMPLATE.md‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.github/ISSUE_TEMPLATE/flaky.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ body:
1212
- Timeout
1313
- Assertion failure
1414
- Other / Unknown
15+
default: 1
1516
validations:
1617
required: true
1718
- type: input

‎.github/workflows/build.yml‎

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ jobs:
783783
job_node_integration_tests:
784784
name:
785785
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
786-
Tests
786+
Tests (${{ matrix.shard }}/3)
787787
needs: [job_get_metadata, job_build]
788788
if: needs.job_build.outputs.changed_node_integration == 'true' || github.event_name != 'pull_request'
789789
runs-on: ubuntu-24.04
@@ -792,12 +792,20 @@ jobs:
792792
fail-fast: false
793793
matrix:
794794
node: [20.19, 22, 24, 26]
795+
shard: [1, 2, 3]
795796
typescript:
796797
- false
797798
include:
798799
# Only check typescript for latest version (to streamline CI)
799800
- node: 24
800801
typescript: '5.0'
802+
shard: 1
803+
- node: 24
804+
typescript: '5.0'
805+
shard: 2
806+
- node: 24
807+
typescript: '5.0'
808+
shard: 3
801809
steps:
802810
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
803811
uses: actions/checkout@v7
@@ -832,14 +840,18 @@ jobs:
832840

833841
- name: Run integration tests
834842
working-directory: dev-packages/node-integration-tests
835-
run: yarn test
843+
run: yarn test --shard=${{ matrix.shard }}/3
836844

837845
job_cloudflare_integration_tests:
838-
name: Cloudflare Integration Tests
846+
name: Cloudflare Integration Tests (${{ matrix.shard }}/2)
839847
needs: [job_get_metadata, job_build]
840848
if: needs.job_build.outputs.changed_cloudflare_integration == 'true' || github.event_name != 'pull_request'
841849
runs-on: ubuntu-24.04
842850
timeout-minutes: 15
851+
strategy:
852+
fail-fast: false
853+
matrix:
854+
shard: [1, 2]
843855
steps:
844856
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
845857
uses: actions/checkout@v7
@@ -856,7 +868,7 @@ jobs:
856868

857869
- name: Run integration tests
858870
working-directory: dev-packages/cloudflare-integration-tests
859-
run: yarn test
871+
run: yarn test --shard=${{ matrix.shard }}/2
860872

861873
job_bundler_plugin_integration_tests:
862874
name: Bundler Plugin Integration Tests (Node ${{ matrix.node }})
@@ -1261,28 +1273,8 @@ jobs:
12611273
# Always run this, even if a dependent job failed
12621274
if: always()
12631275
runs-on: ubuntu-24.04
1264-
permissions:
1265-
issues: write
1266-
checks: read
1276+
permissions: {}
12671277
steps:
1268-
- name: Check out current commit
1269-
if: github.ref == 'refs/heads/develop' && contains(needs.*.result, 'failure')
1270-
uses: actions/checkout@v7
1271-
with:
1272-
sparse-checkout: |
1273-
.github
1274-
scripts
1275-
1276-
- name: Create issues for failed jobs
1277-
if: github.ref == 'refs/heads/develop' && contains(needs.*.result, 'failure')
1278-
uses: actions/github-script@v9
1279-
with:
1280-
script: |
1281-
const { default: run } = await import(
1282-
`${process.env.GITHUB_WORKSPACE}/scripts/report-ci-failures.mjs`
1283-
);
1284-
await run({ github, context, core });
1285-
12861278
- name: Check for failures
12871279
if: cancelled() || contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
12881280
run: |

‎.github/workflows/cleanup-e2e-workers.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ jobs:
3131
3232
if ! output=$(npx --yes wrangler@4 delete --name "$WORKER" --force 2>&1); then
3333
echo "$output"
34-
# 10007 means the worker does not exist, i.e. the PR never ran the optional E2E job.
35-
echo "$output" | grep -q 'code: 10007' || exit 1
34+
# 10007 and 10090 mean the worker does not exist, e.g. the PR never ran the optional E2E job.
35+
echo "$output" | grep -Eq 'code: (10007|10090)\]' || exit 1
3636
fi
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'CI: Weekly flaky tests'
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 7 * * 1'
7+
timezone: 'Europe/Vienna'
8+
9+
permissions:
10+
contents: read
11+
actions: read
12+
checks: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
report:
20+
name: Weekly flaky test report
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 20
23+
steps:
24+
- uses: actions/checkout@v7
25+
with:
26+
persist-credentials: false
27+
- name: Analyze the last seven days of develop CI
28+
uses: actions/github-script@v9
29+
with:
30+
retries: 3
31+
script: |
32+
const { default: run } = await import(
33+
`${process.env.GITHUB_WORKSPACE}/scripts/weekly-flaky-tests.mjs`
34+
);
35+
await run({ github, context, core });

0 commit comments

Comments
 (0)