Skip to content

feat(workerchild): begin porting producer to FutureTrackingProducer - #744

Merged
bmckerry merged 1 commit into
mainfrom
ben/futuretrackingproducer
Jul 6, 2026
Merged

feat(workerchild): begin porting producer to FutureTrackingProducer#744
bmckerry merged 1 commit into
mainfrom
ben/futuretrackingproducer

Conversation

@bmckerry

@bmckerry bmckerry commented Jul 6, 2026

Copy link
Copy Markdown
Member

In order to facilitate only needing a single producer abstraction in services that produce from both tasks and not-tasks, I'm going to replace TaskProducer with Arroyo's FutureTrackingProducer added in getsentry/arroyo#547.

This PR begins the cutover by collecting producer futures from both TaskProducer and FutureTrackingProducer. Once all instances of TaskProducer in Sentry are switched over, I'll remove everything related to TaskProducer.

@bmckerry
bmckerry requested a review from a team as a code owner July 6, 2026 16:58

@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.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0700ac1. Configure here.

task_produced_futures = TaskProducer.collect_futures()
task_produced_futures = (
TaskProducer.collect_futures() | FutureTrackingProducer.collect_futures()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate keys drop futures

Medium Severity

Merging TaskProducer.collect_futures() and FutureTrackingProducer.collect_futures() with dict | keeps only one set of futures when both registries share a producer name. TaskProducer entries are overwritten by FutureTrackingProducer, so those Kafka futures are never awaited and the activation can complete without them finishing or failing.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0700ac1. Configure here.

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.

Not an issue, we won't share names during the cutover

@bmckerry
bmckerry merged commit 47abf74 into main Jul 6, 2026
29 checks passed
@bmckerry
bmckerry deleted the ben/futuretrackingproducer branch July 6, 2026 17:23
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