Skip to content

temp: bypass awaiting futures while still recording metrics#720

Merged
bmckerry merged 4 commits into
mainfrom
ben/temp-skip-taskproducer
Jun 18, 2026
Merged

temp: bypass awaiting futures while still recording metrics#720
bmckerry merged 4 commits into
mainfrom
ben/temp-skip-taskproducer

Conversation

@bmckerry

Copy link
Copy Markdown
Member

We found a bug where some futures weren't completing after several minutes, leading to processing deadlines getting exceeded.
I've added more metrics to help troubleshoot what's happening here, but since having tasks exceed their processing deadline has customer impact this isn't really safe to re-enable in prod.

This PR has activations that produced messages be placed in processed_tasks queue immediately after the task function completes (which is the current behaviour), while still also keeping tasks with futures in the worker child's local queue (meaning we'll still get metrics reported on pending futures).

@bmckerry bmckerry requested a review from a team as a code owner June 17, 2026 20:45
else:
# FIXME(benm): Temporarily bypass producer futures needing to be completed
# before writing to `processed_tasks` while still recording metrics.
_place_processing_result(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm assuming its safe to put a task's ProcessingResult in the processed_tasks queue while still keeping the inflight activation itself pending in the worker child's queue - if I need to somehow clone anything here let me know

Comment thread clients/python/src/taskbroker_client/worker/workerchild.py
Base automatically changed from ben/taskbroker-future-observability to main June 18, 2026 16:10
Comment thread clients/python/src/taskbroker_client/worker/workerchild.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 758f08c. Configure here.

Comment thread clients/python/src/taskbroker_client/worker/workerchild.py
@bmckerry bmckerry merged commit ff28233 into main Jun 18, 2026
49 of 51 checks passed
@bmckerry bmckerry deleted the ben/temp-skip-taskproducer branch June 18, 2026 19:27
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.

2 participants