Skip to content

Commit c0acde4

Browse files
ivovdespairblueclaude
authored
ci: Run PR pipeline on Node 26 (#34032)
Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent f3f075a commit c0acde4

23 files changed

Lines changed: 105 additions & 43 deletions

File tree

.github/actions/setup-nodejs/action.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ description: 'Configures Node.js with pnpm, installs Aikido SafeChain for supply
77

88
inputs:
99
node-version:
10-
description: 'Node.js version to use. Pinned to 24.18.1 by default for reproducible builds.'
10+
description: 'Node.js version to use. Pinned to 26.5.1 by default for reproducible builds.'
1111
required: false
12-
default: '24.18.1'
12+
default: '26.5.1'
1313
enable-docker-cache:
1414
description: 'Whether to set up Blacksmith Buildx for Docker layer caching (Blacksmith runners only).'
1515
required: false
@@ -145,6 +145,16 @@ runs:
145145
shell: bash
146146
run: node .github/scripts/verify-safechain.mjs
147147

148+
- name: Skip Kafka native build (no Node 26 prebuilds)
149+
shell: bash
150+
run: |
151+
node -e "
152+
const fs = require('fs');
153+
const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));
154+
p.pnpm.onlyBuiltDependencies = p.pnpm.onlyBuiltDependencies.filter(d => d !== '@confluentinc/kafka-javascript');
155+
fs.writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
156+
"
157+
148158
# `--loglevel` CLI flag does NOT override `.npmrc` for that path, but
149159
# `--config.loglevel` does — so the failing script's real output reaches us.
150160
# (Confirmed on CI across Blacksmith + GitHub-hosted, through the SafeChain
@@ -183,7 +193,7 @@ runs:
183193
mkdir -p "$PNPM_DIAG_DIR/pnpm-logs"
184194
185195
set +o pipefail
186-
timeout --kill-after=30s 300s $INSTALL_COMMAND \
196+
timeout --kill-after=30s 600s $INSTALL_COMMAND \
187197
--config.logs-dir="$PNPM_DIAG_DIR/pnpm-logs" \
188198
--reporter=append-only --config.loglevel=info 2>&1 | tee "$INSTALL_LOG"
189199
rc=${PIPESTATUS[0]}
@@ -217,7 +227,7 @@ runs:
217227
find "$PNPM_DIAG_DIR/pnpm-logs" -type f -exec sh -c 'echo "----- $1 -----"; cat "$1"' _ {} \; 2>/dev/null || echo "(none)"
218228
echo "::endgroup::"
219229
case "$rc" in
220-
124) echo "::error::pnpm install timed out after 300s (exit 124)" ;;
230+
124) echo "::error::pnpm install timed out after 600s (exit 124)" ;;
221231
137) echo "::error::pnpm install received SIGKILL (exit 137 — likely OOM or kill-after timeout)" ;;
222232
esac
223233
fi

.github/workflows/build-base-image.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
# Node 26 requires alpine 3.23 on DHI (3.22 pairing isn't published).
30-
# While we're on alpine 3.22 awaiting NODE-4184 (graphicsmagick → sharp
31-
# migration that unblocks 3.23), Node 26 base builds can't succeed.
32-
# Restore '26' to this matrix once 3.23 is back.
33-
node_version: ['22', '24.18.1']
29+
# One entry per published Node version: `node_version` is the
30+
# `n8nio/base:<node_version>` tag, `dhi_ref` the DHI base it builds on,
31+
# pinned to a multi-arch index digest. Bump tag and digest together
32+
# when updating.
33+
include:
34+
- node_version: '22'
35+
dhi_ref: dhi.io/node:22.23.2-alpine3.24-dev@sha256:a6ac21cfbc4bb746c1cfc6cf1501ec13c961ae71558ff2ac7e021caaaf91a224
36+
- node_version: '24.18.1'
37+
dhi_ref: dhi.io/node:24.18.1-alpine3.24-dev@sha256:074b5aa92e1ce74cd575214211bbcb8d1550710aec59558da734a67d84d31679
38+
- node_version: '26.5.1'
39+
dhi_ref: dhi.io/node:26.5.1-alpine3.24-dev@sha256:c4062f85acd1ca91ffb7d15048dcc5f15a922d630e65eb3c3c0dcdcef6ea36d8
3440
steps:
3541
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3642

@@ -63,7 +69,7 @@ jobs:
6369
context: .
6470
file: ./docker/images/n8n-base/Dockerfile
6571
build-args: |
66-
NODE_VERSION=${{ matrix.node_version }}
72+
DHI_REF=${{ matrix.dhi_ref }}
6773
platforms: linux/amd64,linux/arm64
6874
provenance: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push == true) }}
6975
sbom: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.push == true) }}

.github/workflows/ci-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
fail-fast: false
3535
matrix:
36-
node-version: [22.23.2, 24.18.1]
36+
node-version: [24.18.1, 26.5.1]
3737
with:
3838
ref: ${{ github.sha }}
3939
nodeVersion: ${{ matrix.node-version }}

.github/workflows/test-linting-reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: Version of node to use.
1313
required: false
1414
type: string
15-
default: 24.18.1
15+
default: 26.5.1
1616

1717
env:
1818
NODE_OPTIONS: --max-old-space-size=7168

.github/workflows/test-unit-reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: Version of node to use.
1313
required: false
1414
type: string
15-
default: 24.18.1
15+
default: 26.5.1
1616
collectCoverage:
1717
required: false
1818
default: false

.github/workflows/test-workflow-scripts-reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
description: Version of node to use.
1313
required: false
1414
type: string
15-
default: 24.18.1
15+
default: 26.5.1
1616

1717
env:
1818
NODE_OPTIONS: --max-old-space-size=7168

docker/images/n8n-base/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Pinned to a multi-arch index digest (linux/amd64 + linux/arm64) for reproducible builds.
2-
# The tag is the human-readable version; Docker resolves by the digest. Bump the tag and
3-
# digest together when updating the base image.
4-
FROM dhi.io/node:24.18.1-alpine3.24-dev@sha256:074b5aa92e1ce74cd575214211bbcb8d1550710aec59558da734a67d84d31679
1+
# CI passes one DHI reference per published Node version (see the matrix in
2+
# build-base-image.yml). The default keeps plain `docker build` working.
3+
ARG DHI_REF=dhi.io/node:24.18.1-alpine3.24-dev@sha256:074b5aa92e1ce74cd575214211bbcb8d1550710aec59558da734a67d84d31679
4+
FROM ${DHI_REF}
55

66
# Install all dependencies in a single layer to minimize image size
77
RUN apk add --no-cache busybox-binsh && \
@@ -22,7 +22,8 @@ RUN apk add --no-cache busybox-binsh && \
2222
tini \
2323
tzdata \
2424
ca-certificates \
25-
libc6-compat && \
25+
libc6-compat \
26+
librdkafka && \
2627
# Cleanup
2728
rm -rf /tmp/* /root/.npm /root/.cache/node /opt/yarn* && \
2829
apk del apk-tools

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.35.0",
44
"private": true,
55
"engines": {
6-
"node": ">=22.22",
6+
"node": ">=24.0.0",
77
"pnpm": ">=10.22.0"
88
},
99
"packageManager": "pnpm@10.32.1",

packages/@n8n/agents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.20.0",
44
"description": "AI agent SDK for n8n's code-first execution engine",
55
"engines": {
6-
"node": ">=22.22"
6+
"node": ">=24.0.0"
77
},
88
"main": "dist/index.js",
99
"module": "dist/index.js",

packages/@n8n/agents/src/workspace/filesystem/n8n-sandbox-filesystem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { SandboxServiceError } from '@n8n/sandbox-client';
22
import { dirname } from 'node:path/posix';
33

4+
import { BaseFilesystem } from './base-filesystem';
45
import { raceWithAbort } from '../../sdk/abort';
6+
import type { N8nSandboxServiceSandbox } from '../sandbox/n8n-sandbox-sandbox';
57
import type {
68
AbortableOptions,
79
AppendOptions,
@@ -16,8 +18,6 @@ import type {
1618
RemoveOptions,
1719
WriteOptions,
1820
} from '../types';
19-
import { BaseFilesystem } from './base-filesystem';
20-
import type { N8nSandboxServiceSandbox } from '../sandbox/n8n-sandbox-sandbox';
2121

2222
function getParentDirectory(path: string): string | null {
2323
const parent = dirname(path);

0 commit comments

Comments
 (0)