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: Refactoring of useRunWorkflow to fix race condition #11311

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

michael-radency
Copy link
Contributor

Summary

Moved clearing of active execution id after push handler

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-2127/node-keeps-on-loading
https://linear.app/n8n/issue/NODE-1480/custom-approval-operations-in-nodes-that-send-messages

@michael-radency michael-radency added the n8n team Authored by the n8n team label Oct 18, 2024
@michael-radency michael-radency removed the request for review from netroy October 18, 2024 12:13
@ShireenMissi ShireenMissi added release/backport Changes that need to be backported to older releases. tests-needed This PR needs additional tests labels Oct 18, 2024
Copy link
Contributor

@alexgrozav alexgrozav 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 before. I'm not 100% aware of how the bug is reproduced so I'll leave testing to someone who's involved. Small change request to help us out in the future.

const execution = await workflowsStore.getExecution((executionId as string) || '');
if (
execution &&
(execution.finished || ['error', 'canceled', 'crashed', 'success'].includes(execution.status))
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition seems to be repeating here and on line 387. Can you please extract it into a isExecutionResolved helper function?

alexgrozav
alexgrozav previously approved these changes Oct 18, 2024
Copy link
Contributor

@alexgrozav alexgrozav left a comment

Choose a reason for hiding this comment

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

Thank you for addressing the changes!

Copy link

cypress bot commented Oct 18, 2024

n8n    Run #7432

Run Properties:  status check passed Passed #7432  •  git commit 90fe852e03: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 michael-radency 🗃️ e2e/*
Project n8n
Run status status check passed Passed #7432
Run duration 04m 24s
Commit git commit 90fe852e03: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 michael-radency 🗃️ e2e/*
Committer Michael Kret
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 453

Copy link
Contributor

✅ All Cypress E2E specs passed

Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

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

we should hold off merging this until @ShireenMissi confirms that this fixes the issue.

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 release/backport Changes that need to be backported to older releases. tests-needed This PR needs additional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants