Skip to content

fix: Ignore missing task ID when removing from _pending - #1735

Merged
tpoliaw merged 1 commit into
mainfrom
shutdown-error-log
Nov 11, 2026
Merged

tpoliaw merged 1 commit into
mainfrom
shutdown-error-log

Conversation

@tpoliaw

@tpoliaw tpoliaw commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

As the _current task is not cleared until it is overwritten when the
next task starts and the killsignal handling goes through the same task
handling logic as 'normal' tasks, the task would be removed from the
pending list twice, failing the second time around.

Given the worker is shutting down at that point it doesn't matter if the
exception is raised, it's just an annoyance to have the false-positive
error logged.

There is more work to be done in this area around when the current task
is cleared and when it is removed from pending but should be a new
change in its own right.

@tpoliaw
tpoliaw requested a review from a team as a code owner October 29, 2026 12:25
@tpoliaw tpoliaw linked an issue Oct 29, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.31%. Comparing base (7cf9bd8) to head (9b64d83).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1735      +/-   ##
==========================================
- Coverage   96.37%   96.31%   -0.06%     
==========================================
  Files          50       50              
  Lines        3831     3831              
==========================================
- Hits         3692     3690       -2     
- Misses        139      141       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

As the _current task is not cleared until it is overwritten when the
next task starts and the killsignal handling goes through the same task
handling logic as 'normal' tasks, the task would be removed from the
pending list twice, failing the second time around.

Given the worker is shutting down at that point it doesn't matter if the
exception is raised, it's just an annoyance to have the false-positive
error logged.

There is more work to be done in this area around when the current task
is cleared and when it is removed from pending but should be a new
change in its own right.

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@tpoliaw
tpoliaw added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 065ce78 Nov 11, 2026
30 of 32 checks passed
@tpoliaw
tpoliaw deleted the shutdown-error-log branch November 11, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error log when deleting environment

2 participants