Skip to content
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): Continue on fail behaviour not correctly implemented #9890

Merged

Conversation

ShireenMissi
Copy link
Contributor

Summary

When using the Execute Workflow Node with multiple items and the following parameters/settings:

  • Mode: Run once for each item
  • On error: Continue

The expected behaviour is to run the sub-workflow for each item and return an error for the items that fail. However, there is a bug that causes the execution to stop once an item fails.

Fix:

This PR fixes the issue by adding the error to the output instead of throwing it and returning early. This allows the sub-workflow to continue running for the remaining items even if one item fails.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-1447/execute-workflow-continue-on-fail-not-correctly-implemented

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@CLAassistant
Copy link

CLAassistant commented Jun 28, 2024

CLA assistant check
All committers have signed the CLA.

@ShireenMissi ShireenMissi marked this pull request as draft June 28, 2024 15:32
@ShireenMissi ShireenMissi changed the title Fix(Execute Workflow Node): Continue on fail behaviour not correctly implemented fix(Execute Workflow Node): Continue on fail behaviour not correctly implemented Jun 28, 2024
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Jun 28, 2024
@ShireenMissi ShireenMissi marked this pull request as ready for review July 1, 2024 09:38
Copy link
Member

@elsmr elsmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected 🎉

Copy link

cypress bot commented Jul 1, 2024

4 flaky tests on run #5733 ↗︎

0 399 0 0 Flakiness 4

Details:

🌳 master 🖥️ browsers:node18.12.0-chrome107 🤖 PR User 🗃️ e2e/*
Project: n8n Commit: 16b1a094b1
Status: Passed Duration: 05:14 💡
Started: Jul 2, 2024 3:10 AM Ended: Jul 2, 2024 3:16 AM
Flakiness  10-undo-redo.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Undo/Redo > should undo/redo renaming node using NDV Test Replay Screenshots Video
Flakiness  5-ndv.cy.ts • 2 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  17-sharing.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Credential Usage in Cross Shared Workflows > should only show credentials in their personal project for members Test Replay Screenshots Video

Review all test suite changes for PR #9890 ↗︎

Copy link
Contributor

github-actions bot commented Jul 1, 2024

✅ All Cypress E2E specs passed

@ShireenMissi ShireenMissi merged commit 16b1a09 into master Jul 1, 2024
27 of 28 checks passed
@ShireenMissi ShireenMissi deleted the node-1447-fix-excute-workflow-continue-on-fail branch July 1, 2024 15:25
@github-actions github-actions bot mentioned this pull request Jul 3, 2024
@janober
Copy link
Member

janober commented Jul 3, 2024

Got released with n8n@1.49.0

adrian-martinez-onestic pushed a commit to onesdata/n8n-fork that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants