From c959346fcb2e572218e9be5a1590407a51ce72ec Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Fri, 24 Jul 2026 13:41:29 -0400 Subject: [PATCH] fix(ci): start Redis before the MCP server; fail fast when MCP never comes up posthog services/mcp (hono) hard-exits without Redis at localhost:6379, so every wizard-ci cell lost its MCP and reported an agent failure per app. Start Redis first (docker/brew/apt per runner OS) and turn the 2-minute MCP readiness warning into a hard error so infra outages fail one step early instead of burning a full agent run per matrix cell. Generated-By: PostHog Code Task-Id: 2d43c175-646e-4d73-a974-760280c8c95b --- .github/workflows/wizard-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wizard-ci.yml b/.github/workflows/wizard-ci.yml index 1d09277ba..d52810227 100644 --- a/.github/workflows/wizard-ci.yml +++ b/.github/workflows/wizard-ci.yml @@ -606,6 +606,23 @@ jobs: echo "::warning::Context Mill server failed to start after 2 minutes" fi + # The MCP hono server hard-exits without Redis (posthog services/mcp + # requires redis at localhost:6379) — start one before it. + if command -v docker > /dev/null 2>&1; then + docker run -d --name wizard-ci-redis -p 6379:6379 redis:7-alpine + elif command -v brew > /dev/null 2>&1; then + brew install redis > /dev/null 2>&1 || true + redis-server --daemonize yes + else + sudo apt-get install -y redis-server > /dev/null 2>&1 && sudo service redis-server start + fi + for i in {1..30}; do + if (echo PING | (command -v redis-cli > /dev/null 2>&1 && redis-cli 2>/dev/null || nc -w1 localhost 6379) | grep -q PONG); then + echo "Redis is ready"; break + fi + sleep 1 + done + # Start MCP server in background (consumes from local examples server) cd $MCP_PATH pnpm dev:local-resources & @@ -629,7 +646,10 @@ jobs: fi done if [ "$MCP_READY" = "false" ]; then - echo "::warning::MCP server failed to start after 2 minutes" + # Fail fast: without the MCP the dashboard task fails in every app, + # burning a full agent run per matrix cell to report an infra outage. + echo "::error::MCP server failed to start after 2 minutes — infra failure, not a wizard failure" + exit 1 fi echo "mcp_pid=$MCP_PID" >> $GITHUB_OUTPUT