Skip to content

ref(preprod): Remove Kafka producer and taskbroker feature flag#112593

Merged
NicoHinderling merged 1 commit intomasterfrom
ref/remove-kafka-producer-preprod
Apr 9, 2026
Merged

ref(preprod): Remove Kafka producer and taskbroker feature flag#112593
NicoHinderling merged 1 commit intomasterfrom
ref/remove-kafka-producer-preprod

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

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

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 9, 2026
@NicoHinderling NicoHinderling marked this pull request as ready for review April 9, 2026 17:23
@NicoHinderling NicoHinderling requested review from a team as code owners April 9, 2026 17:23
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>
@NicoHinderling NicoHinderling merged commit 39b1ebf into master Apr 9, 2026
77 checks passed
@NicoHinderling NicoHinderling deleted the ref/remove-kafka-producer-preprod branch April 9, 2026 18:00
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants