ref(issues): use TaskProducer as the occurrence producer in tasks (round 2)#117081
Merged
Conversation
roggenkemper
approved these changes
Jun 8, 2026
evanh
approved these changes
Jun 8, 2026
markstory
approved these changes
Jun 8, 2026
This was referenced Jun 15, 2026
bmckerry
added a commit
that referenced
this pull request
Jun 16, 2026
`KafkaPublisher` was a deprecated Kafka producer API which was only still used in replay deletion tasks and replay linking in postprocess. This PR moves all instances where `KafkaPublisher` was used over to the existing `sentry.replays.lib.kafka.publish_replay_event` function, which is backed by `SingletonProducer`. It also fixes corresponding tests, and completely deletes `KafkaPublisher` from the codebase. This is a step towards migrating replay-related tasks to use taskbroker-client's `TaskProducer` abstraction (similar to what I've done in #117081, #117107, #117360). I'll open up another PR stacked on top of this one that adds the rollout code for `TaskProducer`.
sehr-m
pushed a commit
that referenced
this pull request
Jun 23, 2026
`KafkaPublisher` was a deprecated Kafka producer API which was only still used in replay deletion tasks and replay linking in postprocess. This PR moves all instances where `KafkaPublisher` was used over to the existing `sentry.replays.lib.kafka.publish_replay_event` function, which is backed by `SingletonProducer`. It also fixes corresponding tests, and completely deletes `KafkaPublisher` from the codebase. This is a step towards migrating replay-related tasks to use taskbroker-client's `TaskProducer` abstraction (similar to what I've done in #117081, #117107, #117360). I'll open up another PR stacked on top of this one that adds the rollout code for `TaskProducer`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same as #116788, which I panic-reverted after seeing CI failures which wound up just being test flakes.