From 83ecf19cc5b579dc51f64016674e69d16da1e62a Mon Sep 17 00:00:00 2001 From: adekunle Date: Sun, 17 May 2026 09:24:02 +0100 Subject: [PATCH] fix(graph-feature-service): guard warmup when accounts are empty --- .../server/handlers/ServerWarmupHandler.scala | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala b/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala index 3e31f2c8f..9bd83042b 100644 --- a/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala +++ b/graph-feature-service/src/main/scala/com/twitter/graph_feature_service/server/handlers/ServerWarmupHandler.scala @@ -31,15 +31,22 @@ class ServerWarmupHandler @Inject() (warmup: ThriftWarmup) extends Handler { } override def handle(): Unit = { - warmup.sendRequest( - GetIntersection, - Request( - GetIntersection.Args( - getRandomRequest - )), - 10 - )() - - logger.info("Warmup Done!") + if (testingAccounts.isEmpty) { + logger.warn( + "Skipping graph-feature-service warmup because no testing accounts are configured." + ) + return } + + warmup.sendRequest( + GetIntersection, + Request( + GetIntersection.Args( + getRandomRequest + )), + 10 + )() + + logger.info("Warmup Done!") +} }