-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
fix(core): Allow index
as top-level item key for Code node
#12469
Conversation
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.
Thanks 🙏🏽
@@ -4,7 +4,19 @@ import type { INodeExecutionData } from 'n8n-workflow'; | |||
import { ValidationError } from './errors/validation-error'; | |||
import { isObject } from './obj-utils'; | |||
|
|||
export const REQUIRED_N8N_ITEM_KEYS = new Set(['json', 'binary', 'pairedItem', 'error']); | |||
export const REQUIRED_N8N_ITEM_KEYS = new Set([ |
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.
we really need to setup a @n8n/constants
package to reduce duplication like this.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
n8n Run #8584
Run Properties:
|
Project |
n8n
|
Branch Review |
CAT-473-v2
|
Run status |
Passed #8584
|
Run duration | 04m 49s |
Commit |
7f78579b05: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
|
Committer | Iván Ovejero |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
485
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
1 similar comment
Got released with |
Got released with |
1 similar comment
Got released with |
Summary
The
index
key was added to theINodeExecutionData
interface by the community, who also added it toFunction
andFunctionItem
. It was then added to Gong, and very recently we added it toExecuteWorkflowTrigger
andToolWorkflowV2
.Until we can stop using this
index
key in all nodes, the Code node will need to allowlist this key so that we do not throw during input data validation. This is especially relevant for a Code node run in a subworkflow execution.Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CAT-473/task-runner-code-node-fails-when-used-in-sub-workflow
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)