-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
feat(core): Separate concurrency limits for production and evaluation executions (no-changelog) #12387
feat(core): Separate concurrency limits for production and evaluation executions (no-changelog) #12387
Conversation
…f concurrency limits
e467f5e
to
fc9be62
Compare
…rency-limits # Conflicts: # packages/cli/src/concurrency/concurrency-control.service.ts
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Lovely work! A few comments, I'll come back later to test.
@@ -35,6 +35,12 @@ export const schema = { | |||
default: -1, | |||
env: 'N8N_CONCURRENCY_PRODUCTION_LIMIT', | |||
}, | |||
evaluationLimit: { | |||
doc: 'Max evaluation executions allowed to run concurrently.', |
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.
Let's add the other details as well? They all apply.
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.
I was not sure about the queue mode here, as the concurrency control service is disabled when n8n is being run in 'queue' mode. Isn't some different way to limit concurrency applies in queue mode for workers?
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.
In queue mode, concurrency control uses the exact same env but is delegated to Bull.
packages/editor-ui/src/components/executions/global/GlobalExecutionsList.vue
Show resolved
Hide resolved
packages/cli/src/concurrency/__tests__/concurrency-control.service.test.ts
Show resolved
Hide resolved
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.
Thanks for addressing everything! Code LGTM
*/ | ||
has(executionId: string) { | ||
if (!this.isEnabled) return false; | ||
|
||
return this.productionQueue.getAll().has(executionId); | ||
return Array.from(this.queues.values()).some((queue) => queue.getAll().has(executionId)); |
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.
Worth optimizing this?
|
n8n Run #8739
Run Properties:
|
Project |
n8n
|
Branch Review |
ai-520-impact-of-test-executions-on-concurrency-limits
|
Run status |
Passed #8739
|
Run duration | 04m 50s |
Commit |
a5ee2408bc: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 burivuhster 🗃️ e2e/*
|
Committer | Eugene Molodkin |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
489
|
View all changes introduced in this branch ↗︎ |
|
✅ All Cypress E2E specs passed |
Got released with |
Summary
This PR separates concurrency limits for evaluation-related executions (both workflow under test and evaluation workflow executions) from existing production concurrency limits.
Related Linear tickets, Github issues, and Community forum posts
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)