From 68d7c970b575a46d248b48c449975470df5adde8 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 31 Jul 2025 17:18:58 +0100 Subject: [PATCH] e2e: Ensure we build the grafana binary when starting up the playwright server (#108992) * ensure we build the grafana binary as part of the playwright server startup * only build if binary isn't there * add comments * handle building the binary in the start-server script --- scripts/grafana-server/start-server | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/grafana-server/start-server b/scripts/grafana-server/start-server index 01ab1b4dbf1..71b6f929510 100755 --- a/scripts/grafana-server/start-server +++ b/scripts/grafana-server/start-server @@ -22,6 +22,13 @@ fi echo starting server +# air now deletes the binary, so we check if we need to build it before trying to start the server +# see https://github.com/air-verse/air/issues/525 +# if this gets resolved, we could remove the go build and rely on the binary being present as before +if [[ ! -f ./bin/grafana ]]; then + make GO_BUILD_DEV=1 build-go-fast +fi + cp -r ./bin $RUNDIR cp -r ./tools $RUNDIR ln -s $(realpath ./public) $RUNDIR