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: 19 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,12 @@ jobs:
runs-on:
namespace-profile-sentry-javascript-large;overrides.cache-tag=sentry-javascript${{ github.event_name ==
'pull_request' && '-pr' || '' }}
# Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks.
continue-on-error: ${{ matrix.node == '^27.0.0-0' }}
strategy:
fail-fast: false
matrix:
node: [20.19, 22, 24, 26]
node: [20.19, 22, 24, 26, '^27.0.0-0']
steps:
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
uses: actions/checkout@v7
Expand All @@ -591,6 +593,11 @@ jobs:
node-version: ${{ matrix.node }}
- name: Restore caches
uses: ./.github/actions/restore-cache
# The native modules have no prebuilt binaries for the Node 27 alpha, so compile them like an install on a
# user's machine does.
- name: Compile native modules
if: matrix.node == '^27.0.0-0'
run: pnpm rebuild @sentry/node-cpu-profiler @sentry/node-native-stacktrace

- name: Run affected tests
run: pnpm run test:pr:node --base=${{ github.event.pull_request.base.sha }}
Expand Down Expand Up @@ -772,10 +779,12 @@ jobs:
namespace-profile-sentry-javascript-large;overrides.cache-tag=sentry-javascript${{ github.event_name ==
'pull_request' && '-pr' || '' }}
timeout-minutes: 20
# Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks.
continue-on-error: ${{ matrix.node == '^27.0.0-0' }}
strategy:
fail-fast: false
matrix:
node: [20.19, 22, 24, 26]
node: [20.19, 22, 24, 26, '^27.0.0-0']
shard: [1, 2, 3]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand All @@ -801,6 +810,11 @@ jobs:
node-version: ${{ matrix.node }}
- name: Restore caches
uses: ./.github/actions/restore-cache
# The native modules have no prebuilt binaries for the Node 27 alpha, so compile them like an install on a
# user's machine does.
- name: Compile native modules
if: matrix.node == '^27.0.0-0'
run: pnpm rebuild @sentry/node-cpu-profiler @sentry/node-native-stacktrace

- name: Run integration tests
working-directory: dev-packages/node-integration-tests
Expand Down Expand Up @@ -873,10 +887,12 @@ jobs:
namespace-profile-sentry-javascript-large;overrides.cache-tag=sentry-javascript${{ github.event_name ==
'pull_request' && '-pr' || '' }}
timeout-minutes: 15
# Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks.
continue-on-error: ${{ matrix.node == '^27.0.0-0' }}
strategy:
fail-fast: false
matrix:
node: [20.19, 22, 24, 26]
node: [20.19, 22, 24, 26, '^27.0.0-0']
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v7
Expand Down
3 changes: 3 additions & 0 deletions docs/supporting-a-new-node-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ Repo: [sentry-javascript](https://github.com/getsentry/sentry-javascript)
Reference: [#20710](https://github.com/getsentry/sentry-javascript/pull/20710)

1. Add the version to the CI test matrix in `.github/workflows/build.yml` to every `node: [20.19, 22, 24, 26]` entry.
While the new major is an alpha, the matrix has it as a range (e.g. `'^27.0.0-0'`) with `continue-on-error`, and a
`Compile native modules` step compiles the native modules from source for it. When the major is released, replace
the range with the major and remove `continue-on-error` and that step.

2. Bump the native module dependencies to the versions released in Steps 1 and 2:
- [ ] `@sentry-internal/node-cpu-profiler` in `packages/profiling-node`
Expand Down
Loading