-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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): Handle cancellation of waiting executions correctly #13051
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
da9f95c
to
ed009e1
Compare
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.
Couple (minor) comments, but mainly looks good
let count = 0; | ||
let executionIds = Object.keys(this.activeExecutions); |
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 if new executions end up in the active executions between when we cancel them and we start waiting for them? I guess those never get cancelled?
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 already have some mechanisms to prevent that from happening, but we still might need more checks. however, that's not a problem specific to this PR, right?
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.
No. I'm just pointing out potential issues we have in the current implementation
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.
should we add a isShutingDown
flag here, like we have on a couple of other services?
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
✅ All Cypress E2E specs passed |
n8n
|
Project |
n8n
|
Branch Review |
shutdown-with-waiting-executions
|
Run status |
|
Run duration | 04m 33s |
Commit |
|
Committer | कारतोफ्फेलस्क्रिप्ट™ |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
1
|
|
5
|
|
0
|
|
434
|
View all changes introduced in this branch ↗︎ |
Summary
In #12806 we stopped removing waiting executions from
ActiveExecutions
to be able to handle the response promises correctly. This has however led to a new issue where cancellation of waiting executions doesn't remove the execution fromActiveExecutions
, which also prevents n8n from shutting down cleanly.Related Linear tickets, Github issues, and Community forum posts
CAT-545
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)