-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
refactor(core): Move execution engine code out of n8n-workflow (no-changelog) #12147
Conversation
n8n Run #8320
Run Properties:
|
Project |
n8n
|
Branch Review |
move-execution-engine-code
|
Run status |
Passed #8320
|
Run duration | 04m 48s |
Commit |
451a510420: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
|
Committer | कारतोफ्फेलस्क्रिप्ट™ |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
0
|
Skipped |
0
|
Passing |
480
|
View all changes introduced in this branch ↗︎ |
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
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 added some questions and suggestions, but all of these can be handled in another PR.
const webhookNode = mock<INode>({ type: 'webhookNode' }); | ||
|
||
nodeTypes.getByNameAndVersion.mockImplementation((type) => { | ||
// TODO: getByNameAndVersion signature needs to be updated to allow returning undefined |
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.
That's not accurate, is it? It throw there if the node can't be found:
n8n/packages/core/src/DirectoryLoader.ts
Lines 188 to 203 in 365e82d
getNode(nodeType: string) { | |
const { | |
nodeTypes, | |
known: { nodes: knownNodes }, | |
} = this; | |
if (!(nodeType in nodeTypes) && nodeType in knownNodes) { | |
const { sourcePath } = knownNodes[nodeType]; | |
this.loadNodeFromFile(sourcePath); | |
} | |
if (nodeType in nodeTypes) { | |
return nodeTypes[nodeType]; | |
} | |
throw new UnrecognizedNodeTypeError(this.packageName, nodeType); | |
} |
You also removed all other checks further up the call chain, so maybe this TODO can be removed and this mock should throw instead of returning undefined?
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.
There are quite a few implementations of INodeTypes
that are not consistent with the actual main implementation NodeTypes
. I want to clean all of these up in a separate PR.
|
||
const nodeTypes = mock<INodeTypes>(); | ||
nodeTypes.getByNameAndVersion.mockImplementation((type) => { | ||
// TODO: getByNameAndVersion signature needs to be updated to allow returning undefined |
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.
Same as the other coment.
packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/ChatTrigger.node.ts
Show resolved
Hide resolved
|
✅ All Cypress E2E specs passed |
This comment was marked as off-topic.
This comment was marked as off-topic.
Got released with |
Summary
This PR moves about 1400 lines related to the execution engine out of
n8n-workflow
, deletes some dead code and unnecessary indirection, and adds some additional unit tests.E2E tests
Workflow tests
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)