Skip to content

Commit

Permalink
feat(devserver): Use env variable to determine kafka container name (#…
Browse files Browse the repository at this point in the history
…81211)

If `USE_NEW_DEVSERVICES` env variable is set, we should use
`kafka-kafka-1` container name in devserver
  • Loading branch information
hubertdeng123 authored Nov 22, 2024
1 parent 64c5f94 commit b83811c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sentry/runner/commands/devserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ def devserver(

# Create all topics if the Kafka eventstream is selected
if kafka_consumers:
if "sentry_kafka" not in containers and "shared-kafka-kafka-1" not in containers:
kafka_container_name = (
"kafka-kafka-1" if os.environ.get("USE_NEW_DEVSERVICES") == "1" else "sentry_kafka"
)
if kafka_container_name not in containers:
raise click.ClickException(
f"""
Devserver is configured to start some kafka consumers, but Kafka
Expand Down

0 comments on commit b83811c

Please sign in to comment.