Skip to content

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

Open
tpoliaw wants to merge 1 commit into
mainfrom
shutdown-error-log
Open

tpoliaw wants to merge 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.

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.41%. Comparing base (0178a43) to head (e14c525).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1735      +/-   ##
==========================================
- Coverage   96.46%   96.41%   -0.06%     
==========================================
  Files          49       49              
  Lines        3791     3791              
==========================================
- Hits         3657     3655       -2     
- Misses        134      136       +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.

This branch has not been deployed

No deployments
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

1 participant