From b83811c30be07c93eee7126d6c985bdd8833b88e Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Fri, 22 Nov 2024 13:14:25 -0800 Subject: [PATCH] feat(devserver): Use env variable to determine kafka container name (#81211) If `USE_NEW_DEVSERVICES` env variable is set, we should use `kafka-kafka-1` container name in devserver --- src/sentry/runner/commands/devserver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sentry/runner/commands/devserver.py b/src/sentry/runner/commands/devserver.py index ce55cc8a3e7902..81c0986ebec41d 100644 --- a/src/sentry/runner/commands/devserver.py +++ b/src/sentry/runner/commands/devserver.py @@ -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