-
Notifications
You must be signed in to change notification settings - Fork 30k
fix(core): Ensure queue is ready when enqueueing #16098
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
Conversation
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.
cubic found 1 issue across 3 files. Review it in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
@ivov I frequently encounter this situation. To reproduce it, concurrent task execution is needed, and errors occur frequently under such conditions. |
|
✅ All Cypress E2E specs passed |
Got released with |
Summary
There are edge cases where
WorkflowRunner
attempts to enqueue before the queue is ready. For legacy reasonsScalingService
is being dynamically imported in multiple spots, so this is a risk and appears to be related to workers enqueuing executions of error-handling workflows, but I have not been able to reproduce the edge case locally.This PR ensures the queue is ready when enqueuing. The root solution would be to modularize scaling mode and remove its multiple dynamic imports, and so that all code paths relying on scaling mode are guaranteed that scaling mode init is complete. Adi made an attempt at #11278 but was not satisfied.
Let's fix this now for the time being and work towards modularizing scaling mode when time allows.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CAT-784
Fix #15233
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)