-
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
fix(Execute Workflow Node): Passing the workflow that is supposed to be executed as a paramter #8614
fix(Execute Workflow Node): Passing the workflow that is supposed to be executed as a paramter #8614
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.
LGTM
1 flaky test on run #4085 ↗︎
Details:
cypress/e2e/38-custom-template-repository.cy.ts • 1 flaky test
Review all test suite changes for PR #8614 ↗︎ |
✅ All Cypress E2E specs passed |
@@ -29,7 +29,8 @@ export async function getWorkflowInfo(this: IExecuteFunctions, source: string, i | |||
workflowInfo.code = jsonParse(workflowJson); | |||
} else if (source === 'parameter') { | |||
// Read workflow from parameter | |||
workflowInfo.code = this.getNodeParameter('workflowJson', itemIndex) as IWorkflowBase; | |||
const workflowJson = this.getNodeParameter('workflowJson', itemIndex) as string; |
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.
A better fix for this would be to make sure that getNodeParameter
does jsonParse
when the parameter type is json
. either that, or we get rid of type: 'json'
, and convert such parameters to be strings.
Created a backlog ticket for this: ENG-101
…be executed as a paramter (#8614)
Got released with |
…be executed as a paramter (#8614)
Summary
This fixes a regression introduced with 216ec07, e.g. in version 1.23.0.
I'd love to write a test for this too, but the node is not testable right now with the unit test framework. First this function here has to be implemented:
n8n/packages/nodes-base/test/nodes/Helpers.ts
Line 177 in 32281d1
I've tried, but I stopped after a while, not to loose too much time on it. Maybe the nodes team can take a look at adding a test for this.
Related tickets and issues
https://linear.app/n8n/issue/PAY-1362/execute-workflow-node-with-source-parameter-does-not-work-anymore
Review / Merge checklist
(no-changelog)
otherwise. (conventions)