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(core): Ensure worker stops picking up new jobs while shutting down #13714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Mar 5, 2025

Summary

On master we currently pause the queue on shutdown only for main, i.e. the worker continues to pick up jobs during shutdown which are likely to be interrupted by the 30s shutdown timeout. This PR ensures the worker stops dequeuing jobs during shutdown.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-693/worker-shutdown-works-incorrectly

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Mar 5, 2025
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Mar 10, 2025

n8n    Run #9678

Run Properties:  status check failed Failed #9678  •  git commit 501777986b: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Project n8n
Branch Review cat-693-worker-shutdown-works-incorrectly
Run status status check failed Failed #9678
Run duration 04m 32s
Commit git commit 501777986b: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ivov 🗃️ e2e/*
Committer Iván Ovejero
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 364
View all changes introduced in this branch ↗︎

Tests for review

Failed  39-projects.cy.ts • 1 failed test

View Output Video

Test Artifacts
Projects > when starting from scratch > should move resources between projects Test Replay Screenshots Video
Failed  28-debug.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  30-editor-after-route-changes.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  28-resource-mapper.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  29-templates.cy.ts • 0 failed tests

View Output

Test Artifacts

The first 5 failed specs are shown, see all 30 specs in Cypress Cloud.

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

1 similar comment
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@netroy
Copy link
Member

netroy commented Mar 10, 2025

This PR needs latest master to be merged, to fix the e2e tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants