-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement new partial execution logic for acyclic workflows (no-changelog) #10256
Conversation
a916157
to
55b3264
Compare
55b3264
to
fe50536
Compare
PARTIAL_EXECUTION_VERSION_DEFAULT can be 0 or 1
91a3552
to
37f5e28
Compare
37f5e28
to
320eeb7
Compare
5b30dfc
to
11685f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. Nothing anymore that would block merging this 🚀
//function findAllPinnedActivators(workflow: Workflow, pinData?: IPinData) { | ||
// return Object.values(workflow.nodes) | ||
// .filter( | ||
// (node) => | ||
// !node.disabled && | ||
// pinData?.[node.name] && | ||
// ['trigger', 'webhook'].some((suffix) => node.type.toLowerCase().endsWith(suffix)) && | ||
// node.type !== 'n8n-nodes-base.respondToWebhook', | ||
// ) | ||
// .sort((a) => (a.type.endsWith('webhook') ? -1 : 1)); | ||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this in a future PR. It's referenced in the todo above, so I don't forget:
n8n/packages/core/src/PartialExecutionUtils/findTriggerForPartialExecution.ts
Lines 36 to 37 in 11685f5
// TODO: add the other filters here from `findAllPinnedActivators`, see | |
// copy below. |
|
n8n Run #6941
Run Properties:
|
Project |
n8n
|
Branch Review |
pay-1727-spike-partial-execution-logic
|
Run status |
Passed #6941
|
Run duration | 04m 37s |
Commit |
87cbab8f62: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 despairblue 🗃️ e2e/*
|
Committer | Danny Martini |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
0
|
Skipped |
0
|
Passing |
430
|
View all changes introduced in this branch ↗︎ |
Co-authored-by: Tomi Turtiainen <[email protected]>
✅ All Cypress E2E specs passed |
…-changelog) (#10256) Co-authored-by: Tomi Turtiainen <[email protected]>
Got released with |
Summary
This PR is rather big.
It does contain TODOs and functions that miss implementation. I'm aware of that, but still find that getting this into trunk now and creating smaller PRs for the TODOs and missing functionality will make future reviewing easier.
It's mostly new files that connect with the old code via one feature gate in the
POST /workflows/run
controller/service.The new functionality should not have an effect on the old code.
The new code follows the spec written here: https://www.notion.so/n8n/Partial-Executions-9f24ffe8c6474eaeab51c9784ad1fd46?p=4298d34eb54f42e1baa098c9ccc50b5a&pm=s
Changes to the old code are kept to a minimum to avoid breaking the old partial execution flow. The goal is to remove all old code after the new partial executions flow saw enough testing.
I also added some comments to parts of the code that I did not immediately understand.
Important Review Notes
It's best to start reviewing with this file:
packages/core/src/WorkflowExecute.ts
Everything in
cypress/*
is only done to make the interceptors still work withPOST /workflow/run
having a query parameter now.All the new code including the tests are in
packages/core/src/PartialExecutionUtils
neatly separated by modules that align with the aforementioned spec.The editor code only contains small adjustments to allow for switching between the old and new flow using a key in local storage.
If you're done with all these, you pretty much reviewed 90% of the PR. Congratulations!
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/PAY-1755/phase-1-partial-execution-logic-in-basic-workflows
Review / Merge checklist
Docs updated or follow-up ticket created.PR Labeled withrelease/backport
(if the PR is an urgent fix that needs to be backported)