Skip to content

fix: Remove tiled writer if submitted task doesn't exist#1484

Open
tpoliaw wants to merge 2 commits intomainfrom
duplicate-tiled-writers
Open

fix: Remove tiled writer if submitted task doesn't exist#1484
tpoliaw wants to merge 2 commits intomainfrom
duplicate-tiled-writers

Conversation

@tpoliaw
Copy link
Copy Markdown
Contributor

@tpoliaw tpoliaw commented Apr 13, 2026

Whenever a task is submitted, a TiledWriter is added to the run engine
and is only removed when the task is complete. If the task never starts
due to not being found, the writer would never be removed and subsequent
tasks would have duplicate writers causing write errors to tiled.

Catching the KeyError and removing the subscribers immediately is a
workaround that works but should be removed when the internal pending
tasks queue is removed.

Fixes #1480

Whenever a task is submitted, a TiledWriter is added to the run engine
and is only removed when the task is complete. If the task never starts
due to not being found, the writer would never be removed and subsequent
tasks would have duplicate writers causing write errors to tiled.

Catching the KeyError and removing the subscribers immediately is a
workaround that works but should be removed when the internal pending
tasks queue is removed.
@tpoliaw tpoliaw requested a review from a team as a code owner April 13, 2026 13:05
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.09%. Comparing base (774781b) to head (0c1ffa8).

Files with missing lines Patch % Lines
src/blueapi/service/interface.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1484      +/-   ##
==========================================
- Coverage   95.21%   95.09%   -0.12%     
==========================================
  Files          43       43              
  Lines        3132     3137       +5     
==========================================
+ Hits         2982     2983       +1     
- Misses        150      154       +4     

☔ View full report in Codecov by Sentry.
📢 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.

@tpoliaw tpoliaw requested a review from dan-fernandes April 13, 2026 13:26
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.

PUT to /worker/task stuck on 409, after a 404

1 participant