From 2ddbb9353754eadbc66af09701d4c83babe15ee6 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Mon, 1 Jun 2026 17:34:00 +0300 Subject: [PATCH] ci: seed config before linux-smoke launch so the server actually serves With the PyGObject girepository-2.0 fix in place, the linux-smoke step ran its server-boot assertion for the first time and failed: on a fresh runner the first-run bootstrap writes a default config and calls sys.exit(0) ("First run: generated default config ... then restart") instead of serving, so /api/health never came up and the 15s wait timed out. That exit-on-first-run is deliberate product behavior (never silently start in insecure no-auth mode), so adjust the test rather than the app: invoke the server once to seed the config (it exits 0 before binding the port), then launch it for real. /api/health requires no auth, so the auto-generated token is irrelevant to the check. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index cddd5e9..d987811 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -83,6 +83,12 @@ jobs: export MEDIA_SERVER_VISUALIZER_ENABLED=false export MEDIA_SERVER_UPDATE_CHECK_ENABLED=false dbus-run-session -- bash -c ' + # First run writes a default config (random token) and exits 0 + # instead of serving, so the server is never left running in + # insecure no-auth mode. Run once to seed the config; the real + # launch below then finds it and actually boots. /api/health needs + # no auth, so the generated token is irrelevant here. + python -m media_server.main --no-tray --port 18765 || true python -m media_server.main --no-tray --port 18765 & SERVER_PID=$! for i in $(seq 1 30); do