-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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): Consider subworkflows successfully run when in waiting state #7699
fix(core): Consider subworkflows successfully run when in waiting state #7699
Conversation
@@ -902,10 +903,11 @@ async function executeWorkflow( | |||
} | |||
data = await workflowExecute.processRunExecutionData(workflow); | |||
} catch (error) { | |||
const executionError = error ? (error as ExecutionError) : 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.
What's the error
we're throwing here? Is it possible to prevent it being thrown at all?
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 error has nothing to do with the bug reported, I just noticed that it was untyped. I guess anything that could go wrong during the execution would throw that particular error.
@@ -953,21 +955,23 @@ async function executeWorkflow( | |||
|
|||
void internalHooks.onWorkflowPostExecute(executionId, workflowData, data, additionalData.userId); | |||
|
|||
if (data.finished === true) { | |||
// subworkflow either finished, or is in status waiting due to a wait node, both cases are considered successes here | |||
if (data.finished === true || data.status === 'waiting') { |
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.
Would it make sense to change the check to data.status !== 'error'
?
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.
It would not be just error I guess, it would have to be canceled, crashed, error, failed, unknown, warning, new - so I think this way around is easier
…low-has-a-wait-that-needs
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.
Tested this change and it's working. We plan on refactoring parts of this file and then we should be adding tests for this code.
3 flaky tests on run #2862 ↗︎
Details:
6-code-node.cy.ts • 1 flaky test
28-resource-mapper.cy.ts • 2 flaky tests
Review all test suite changes for PR #7699 ↗︎ |
✅ All Cypress E2E specs passed |
# [1.17.0](https://github.com/n8n-io/n8n/compare/n8n@1.16.0...n8n@1.17.0) (2023-11-15) ### Bug Fixes * **Convert to/from binary data Node:** Better mime type defaults ([#7693](#7693)) ([9b3be0c](9b3be0c)) * **core:** Consider subworkflows successfully run when in waiting state ([#7699](#7699)) ([0e00dab](0e00dab)) * **core:** Fix named parameter resolution in migrations ([#7688](#7688)) ([4441ed5](4441ed5)), closes [#7628](#7628) * **core:** Initialize JWT Secret before it's used anywhere ([#7707](#7707)) ([3460eb5](3460eb5)) * **core:** Reduce memory usage in credentials risk auditing ([#7663](#7663)) ([9fd6319](9fd6319)) * **Date & Time Node:** Add fromFormat option to solve ambiguous date strings ([#7675](#7675)) ([d2d11e0](d2d11e0)) * **editor:** Fix resource mapper component being truncated ([#7664](#7664)) ([00dff50](00dff50)) * **editor:** More securely clear executions tab auto refresh timer ([#7685](#7685)) ([37dd658](37dd658)) * **editor:** Redirect to workflow editor after saving in debug mode ([#7645](#7645)) ([020042e](020042e)) * **Google Sheets Node:** Append exceeding grid limits ([#7684](#7684)) ([88efb99](88efb99)) * **HTTP Request Node:** Support generic credentials when using pagination ([#7686](#7686)) ([48b240b](48b240b)), closes [#7653](#7653) * **HubSpot Node:** Fetching available parameters fails when using expressions ([#7672](#7672)) ([a9ab738](a9ab738)) * **HubSpot Node:** Update deal owner on Hubspot Deal ([#7673](#7673)) ([3c0734b](3c0734b)) * **Spreadsheet File Node:** Read file as utf-8 in v1 ([#7701](#7701)) ([786b4ad](786b4ad)) ### Features * **core:** Expression function $ifEmpty ([#7660](#7660)) ([1c7225e](1c7225e)) * **Date & Time Node:** Option to include other fields in output item ([#7661](#7661)) ([aea3c50](aea3c50)) * **Discord Node:** Overhaul ([#5351](#5351)) ([6a53c2a](6a53c2a)) * **Discourse Node:** Add new options to Get Users ([#7674](#7674)) ([2e8c841](2e8c841)) * **editor:** Add color selector to sticky node ([#7453](#7453)) ([8359364](8359364)) * **editor:** Add HTTP request nodes for credentials without a node ([#7157](#7157)) ([14035e1](14035e1)) * **editor:** Add workflow filters to querystring ([#7456](#7456)) ([afd637b](afd637b)) * **editor:** Adds a EE view to show worker details and job status ([#7600](#7600)) ([cbc6909](cbc6909)) * **GitLab Node:** Add support for pagination on getIssues ([#7529](#7529)) ([0a0798e](0a0798e)) * **OpenAI Node:** Add dall-e-3 support ([#7655](#7655)) ([a9c7188](a9c7188)) * **RabbitMQ Trigger Node:** Add exchange and routing key options ([#7547](#7547)) ([5aee2b7](5aee2b7)) * **Telegram Node:** Add support for markdownv2 ([#7679](#7679)) ([819b3a7](819b3a7)) * **Venafi TLS Protect Cloud Node:** Add region parameter to Venafi protect cloud ([#7689](#7689)) ([a08fca5](a08fca5)) ### Performance Improvements * **core:** Lazyload security audit reporters ([#7696](#7696)) ([b2ca050](b2ca050)) Co-authored-by: ivov <ivov@users.noreply.github.com>
Got released with |
@krynble @flipswitchingmonkey can you please make sure to add tests? |
@mutdmour we will refactor this part of the code as part of our quarterly goals, it's currently impossible to add tests as it's convoluted, that's why I approved it without it, see my comment above. |
@krynble great thanks |
Github issue / Community forum post (link here to close automatically):
#7189