grafana/phlare

Only start ui server when all services are ready in single binary mode

eh-am opened this issue · 1 comments

eh-am commented

Otherwise one may try to access the UI (http://localhost:4100/ui) and get error messages saying that the frontend is not running yet:

level=warn caller=gokit.go:79 caller=http.go:196 traceID=17ac6d89e8d65d4b msg="GET /pyroscope/label-values?label=__name__ (500) 91.625µs Response: \"unavailable: grpc roundtripper error: frontend not running: New\\n\" ws: false; Accept: */*; Accept-Encoding: gzip, deflate, br; Accept-Language: en-US,en;q=0.5; Connection: keep-alive; Referer: http://localhost:4100/ui/?query=; Sec-Fetch-Dest: empty; Sec-Fetch-Mode: cors; Sec-Fetch-Site: same-origin; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0; X-Scope-Orgid: ; "

Also that makes e2e tests more difficult, since it assumes the UI is only available when everything else is also available.

eh-am commented

Actually since this is such an edge case, may be best to just fix it for E2E tests.