Commit Graph

5104 Commits

Author SHA1 Message Date
Florian Gößler
fd4f0d76b6
perf(engine): Load only the columns and rows the execution path reads
- loadExecution no longer reads trigger_outputs. It runs for every step,
  but only the execution start reads the trigger payload. The start now
  reads it with the new loadTriggerOutputs, in parallel with
  loadExecution, so the start has no extra sequential round trip.
  ExecutionRecord no longer carries triggerOutputs; NewExecutionRecord
  still does.
- loadAllSteps becomes loadCompletedStepOutputs. The v1 step data loader
  used only the node id, the iteration and the outputs of completed
  steps, but it read all 12 columns of every step. The query now filters
  on status = 'completed' and reads the three columns.
- These queries run as static named prepared statements. The
  prepared-statement helper moves to database/prepared-query.ts and
  borrows a pooled connection when it runs outside a transaction.

Durability and ordering guarantees do not change.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:07:43 +02:00
Florian Gößler
6eda05b653
perf(core): Send the Postgres session settings once per pooled connection
The TypeORM fork sent `SET search_path` (and `SET statement_timeout`,
when configured) every time it took a connection from the pool. That is
one extra round trip before every repository call and every transaction.

These settings last for the whole session, and no n8n code changes them
during a session. The driver now sends them once for each new pooled
connection and remembers that connection in a WeakSet.

This change is in the shared driver, so it applies to every n8n process
that uses PostgreSQL, not only engine v2. A trace of webhook -> 3 steps on
the engine data plane goes from 111 to 68 statements, and the SET runs
2 times instead of 45.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 16:02:13 +02:00
Florian Gößler
edcdcadc9d
perf(engine): Run the createSteps statements as static prepared statements
createSteps built its INSERT with one VALUES tuple per record, so the
statement text changed with the batch size. Now it passes one array for
each column through unnest, so the text is the same for every call.

Both createSteps statements (the execution-row lock and the insert) now
run as named prepared statements on the transaction's connection.
PostgreSQL parses and plans each one once per connection.

WITH ORDINALITY and ORDER BY keep the insert in input order, so
RETURNING still lists the created rows in the order of the records.

Named prepared statements need a direct connection or a session-mode
pooler. A transaction-mode PgBouncer before 1.21 does not support them.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 15:15:02 +02:00
Florian Gößler
1908b5cf4c
perf(engine): Cut database round trips on the step settle and run paths
Each queue on the data plane handles one message at a time, so every
sequential round trip adds to the time per execution.

- createSteps: move the failed-step test into the INSERT. The test still
  runs as a statement after the execution-row lock, so it sees a failure
  that commits while the insert waits for the lock. 5 round trips become 4.
- step:settled: read hasFailedSteps in parallel with loadStep and
  loadExecution. A failure that lands after the probe still stops
  planning, because createSteps refuses to insert after a failure.
- step:settled: skip refreshLiveStatus when it cannot change the status:
  after the handler finishes the execution, and after it queues steps for
  an execution that is running.
- v1 step data loader: load the execution and its steps in parallel.

Durability and ordering guarantees do not change. One visible effect:
if a branch suspends while another branch queues steps, the execution
can show 'waiting' instead of 'running' until the next settlement. The
engine treats both statuses as live, so only the reporting API sees it.

Webhook -> 3 NoOps: about 12 fewer sequential round trips on the
orchestrator and 3 fewer on the step worker per execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 15:01:28 +02:00
Danny Martini
adfc54a090 feat(engine): Add engine v2 tracing spans and a benchmark NoOp opt-in 2026-10-16 00:46:50 +02:00
Benjamin Schroth
8b68b0fcdd
feat: Add the n8n Chat agent chat page, agents library and merged chat lists (no-changelog) (#40335) 2026-10-06 09:35:35 +00:00
Andreas Fitzek
2d09135c6e
feat(core): Persist trusted source metadata and discover it asynchronously (no-changelog) (#40048)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 09:14:52 +00:00
Lorent Lempereur
e82087bcc8
feat(core): Stop a durable system task run when its claim is lost (no-changelog) (#40272) 2026-10-06 09:07:37 +00:00
Lorent Lempereur
fe91413e5d
feat(core): Renew the lease of a durable task while its handler runs (no-changelog) (#40271)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Emilia <100027345+sovietspaceship@users.noreply.github.com>
2026-10-06 09:07:36 +00:00
Lorent Lempereur
f4c734e7e0
feat(core): Add a lease heartbeat to the durable scheduler (no-changelog) (#40270) 2026-10-06 09:07:35 +00:00
Lorent Lempereur
4b69c32541
feat(core): Add a lease renewal query to the scheduled task repository (no-changelog) (#40269) 2026-10-06 09:07:34 +00:00
Lorent Lempereur
f26d7fbfe7
refactor(core): Extract the handler failure path of the scheduler executor (no-changelog) (#40267) 2026-10-06 09:07:32 +00:00
n8n-assistant[bot]
a11777054a
🚀 Release 2.43.0 (#40376)
Co-authored-by: n8n-release-helper[bot] <265227495+n8n-release-helper[bot]@users.noreply.github.com>
2026-10-06 07:10:16 +00:00
Uddish Verma
0280644e77
refactor(API): Migrate GET /settings/log-streaming/event-types to the decorator pattern (no-changelog) (#40234)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 15:55:04 +00:00
Sandra Zollner
f7cfb520bf
feat(editor): Submit selected project changes from the promote modal (#39609) 2026-10-05 15:31:23 +00:00
Anne Aguirre
a2fd4189f1
feat(core): Persist agent budget spend in the database (#40138)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-10-05 15:11:29 +00:00
Sam Wooler
5f73c7cdcb
feat(API): Support multipart request bodies on Public API controller routes (no-changelog) (#40074) 2026-10-05 15:08:34 +00:00
Charlie Kolb
b5fe251ba5
refactor(core): Move ownership transfer registry to backend services (#40308) 2026-10-05 14:30:21 +00:00
José Braulio González Valido
b7071c91c7
fix(ai-builder): Treat a blank folder path as no folder in the build tool (#40116)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:57:14 +00:00
Charlie Kolb
206fc6f317
refactor(core): Move instance write access service (#40307) 2026-10-05 13:54:20 +00:00
Nour Alhadi Mahmoud
548bd57802
fix(core): Load workflow publish history in a separate query (#40171)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:30:49 +00:00
Thanasis G
022f4a6477
feat(Azure OpenAI Chat Model Node): Add the deployment dropdown (#39643)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:15:57 +00:00
Pierantonio Cangianiello
8fa89ee02f
docs(engine): Add ADR on binary data access from a data plane in a separate process (no-changelog) (#40179) 2026-10-05 12:55:40 +00:00
Benjamin Schroth
9183d0422c
fix(core): Resolve the request target against the dispatcher origin (#39506) 2026-10-05 12:28:43 +00:00
James Martin
073239e6d5
chore(core): Implements JWKS service to provide key pair for signing tokens (no-changelog) (#39718)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 12:22:32 +00:00
Riqwan Thamir
7779f47a7d
fix(core): Retry transient Observer model failures (no-changelog) (#40263) 2026-10-05 12:16:57 +00:00
Andreas Fitzek
79924a5d93
refactor(core): Drop TypeORM imports from event bus, LDAP reset, ownership, evaluation, and tags (no-changelog) (#39353)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 12:14:47 +00:00
Andreas Fitzek
1942447e90
feat(core): Add a shared OAuth discovery and JWKS client (no-changelog) (#40012)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 12:11:52 +00:00
Savelii
44d9adfc7e
fix(core): Use the new client ID and secret for OAuth2 client credentials (#39891)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-05 12:02:55 +00:00
Ali Elkhateeb
fa8b8b243e
refactor(API): Migrate LDAP sync endpoints to PublicApiController (#40280)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 12:00:55 +00:00
Eugene
c4c31a529c
feat(core): Add parent-Agent plan tools (no-changelog) (#39542) 2026-10-05 11:59:50 +00:00
Riqwan Thamir
fe07e84d0f
fix(core): Keep skill activation and memory compaction from breaking the prompt cache (no-changelog) (#40245)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 10:48:35 +00:00
Stephen Wright
6610987057
fix(Azure OpenAI Chat Model Node): Support Responses-only deployments (#39403)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-05 10:46:42 +00:00
Andreas Fitzek
32d7c8ebf4
feat(core): Add inbound-auth contracts and fail-closed defaults (no-changelog) (#40004)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-05 09:30:49 +00:00
Eugene
b9695a7f6e
feat(core): Add Agent plan storage foundation (no-changelog) (#39482) 2026-10-05 09:01:48 +00:00
Charlie Kolb
4ea06438db
chore: Remove legacy CODEOWNERS file (#40266) 2026-10-05 08:14:37 +00:00
Irénée
d931d6415a
feat(API): Apply a selection of workflows on the destination (no-changelog) (#39612)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-05 08:07:22 +00:00
Ricardo Espinoza
5e28ff8c23
fix(core): Block publishing workflows with unconnected required node inputs (#37265)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-05 07:56:07 +00:00
Matsu
72a4024161
chore: Complete base package migration to Oxlint (#40257) 2026-10-05 10:48:34 +03:00
Matsu
e18afc84cc
chore: Migrate remaining simple base packages to Oxlint (#40255) 2026-10-05 10:04:49 +03:00
Matsu
bec84a1dad
chore: Migrate more base packages to Oxlint (#40254) 2026-10-05 10:04:09 +03:00
Charlie Kolb
d6a364c0c0
build: Load backend test utilities from source in Vitest (#40212) 2026-10-05 06:25:06 +00:00
Charlie Kolb
68ced97f81
refactor(core): Share decorator transform through Vitest config (#40213) 2026-10-05 06:24:53 +00:00
Matsu
d6ec4c5546
chore: Migrate part of the base packages to oxlint (#40253) 2026-10-05 06:18:31 +00:00
n8n-cat-bot[bot]
be2ee6f356
fix: Replace deprecated APIs in services and tooling (#40199)
Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com>
2026-10-05 04:50:04 +00:00
Robin Braumann
bae7656347
feat(core): Coordinate background sub-agent pause and resume in Preview (no-changelog) (#40119)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 15:29:57 +00:00
n8n-cat-bot[bot]
df27223a4e
fix: Pass shutdown margin to JavaScript runner in runners image (#40178)
Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com>
2026-10-02 14:55:52 +00:00
mfsiega
56d6e9da2c
feat(core): Stop engine v2 executions from the control plane (#39786)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 14:53:46 +00:00
Charlie Kolb
afd7cb4851
refactor(core): Move project scope service to backend services (#40209) 2026-10-02 14:45:32 +00:00
Charlie Kolb
ea38f3a3ee
refactor(core): Load packaged modules from a static manifest (no-changelog) (#40037) 2026-10-02 13:42:01 +00:00