ref(preprod): Remove Kafka producer and taskbroker feature flag#112593
Merged
NicoHinderling merged 1 commit intomasterfrom Apr 9, 2026
Merged
ref(preprod): Remove Kafka producer and taskbroker feature flag#112593NicoHinderling merged 1 commit intomasterfrom
NicoHinderling merged 1 commit intomasterfrom
Conversation
Taskbroker is now the only dispatch path for preprod artifacts. Remove the Kafka producer module, the launchpad-taskbroker-rollout feature flag, and all associated dead code including the orphaned Kafka topic definition and settings constant. Move PreprodFeature enum from the deleted producer module to quotas where it is actually used. Simplify the rerun analysis endpoint to check run_size directly instead of building an intermediate list. Co-Authored-By: Claude <noreply@anthropic.com>
7b3b615 to
2b337ce
Compare
trevor-e
approved these changes
Apr 9, 2026
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
) Taskbroker is now the only dispatch path for preprod artifacts. This PR removes the old Kafka producer path and all associated dead code. **What's removed:** - `src/sentry/preprod/producer.py` — entire module (was already fully commented out) - `launchpad-taskbroker-rollout` feature flag registration - `PREPROD_ARTIFACT_EVENTS` Kafka topic definition and cluster mapping - `SENTRY_PREPROD_ARTIFACT_EVENTS_FUTURES_MAX_LIMIT` settings constant - All `produce_preprod_artifact_to_kafka` references in tests **What's simplified:** - `PreprodFeature` enum moved from deleted `producer.py` to `quotas.py` - Rerun analysis endpoint now checks `run_size` directly instead of building an intermediate `requested_features` list - `cleanup_old_metrics` uses list comprehension for file ID collection **Tests updated:** - Replaced kafka/flag-gated dispatch tests with direct `dispatch_taskbroker` assertions - Replaced `produce_preprod_artifact_to_kafka` mock tests with `cleanup_old_metrics` mock tests that verify quota-based cleanup behavior Co-authored-by: Claude <noreply@anthropic.com>
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.
Taskbroker is now the only dispatch path for preprod artifacts. This PR removes the old Kafka producer path and all associated dead code.
What's removed:
src/sentry/preprod/producer.py— entire module (was already fully commented out)launchpad-taskbroker-rolloutfeature flag registrationPREPROD_ARTIFACT_EVENTSKafka topic definition and cluster mappingSENTRY_PREPROD_ARTIFACT_EVENTS_FUTURES_MAX_LIMITsettings constantproduce_preprod_artifact_to_kafkareferences in testsWhat's simplified:
PreprodFeatureenum moved from deletedproducer.pytoquotas.pyrun_sizedirectly instead of building an intermediaterequested_featureslistcleanup_old_metricsuses list comprehension for file ID collectionTests updated:
dispatch_taskbrokerassertionsproduce_preprod_artifact_to_kafkamock tests withcleanup_old_metricsmock tests that verify quota-based cleanup behavior