Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(core): Fix execution cancellation issues in scaling mode #12343

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

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Dec 23, 2024

Summary

This PR fixes a number of issues with execution cancellation in scaling mode:

  1. After the introduction of ExecutionCancelledError if you abort an active production execution in scaling mode, the execution ends up with error status rather than canceled. Only executions aborted after being dequeued are affected. This PR is a hotfix for the issue - see before and after.
  2. For a long time we have been sending two abort-job messages to a worker for a single cancellation. More context here. This PR prevents the second message.
  3. Cancelling an execution produces not one but two error logs with full stack traces, see here. ExecutionCancelledError is not an actual error to handle and the cancellation is already being reported normally via debug logs, so this PR removes that noise, which can be confusing for users as well.

Related Linear tickets, Github issues, and Community forum posts

None, I noticed these issues by chance.

Review / Merge checklist

  • PR title and summary are descriptive
  • Docs updated
  • Tests included (legacy flow not easily testable)
  • PR Labeled with release/backport

@ivov ivov added the tests-needed This PR needs additional tests label Dec 23, 2024
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/core/src/error-reporter.ts 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ivov ivov changed the title fix(core): Fix canceled status for active production executions in scaling mode fix(core): Fix execution cancellation issues in scaling mode Dec 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team tests-needed This PR needs additional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant