Feature Request: Add better log messaging around services successfully starting
Created by: northyg
Feature request description
Posting this on behalf of a customer. It would be helpful if sourcegraph-frontend-0 issued a message that it is up and good once it can contact all services, or something else to indicate that services have started successfully.
The problem is that it appears what is happening in the log file is that when the docker-compose start/restarts the frontend service, some services get started before other ones, such as prometheus, redis-cache, etc. The front end is logging the error until the other services start. This causes confusion because the log messages make it sound like there is a problem, when there might not be.
Log message example:
sourcegraph-frontend-internal | 2021-06-10T22:26:50.680996301Z t=2021-06-10T22:26:50+0000 lvl=eror msg="config: failed to read config from database(2), trying again in 1s (read error)" error="confdb.SiteGetLatest: FATAL: terminating connection due to administrator command (SQLSTATE 57P01)"
sourcegraph-frontend-internal | 2021-06-10T22:26:51.481258969Z t=2021-06-10T22:26:51+0000 lvl=eror msg="Failed migration action" migrationID=3 error="FATAL: terminating connection due to administrator command (SQLSTATE 57P01)"
Which is eventually followed by:
sourcegraph-frontend-internal | 2021-06-10T22:29:33.827277821Z ✱ Sourcegraph is ready at: https://sourcegraph.[redacted]
I believe this code section is relevant to the error logging:
- https://k8s.sgdev.org/github.com/sourcegraph/sourcegraph@HEAD/-/blob/internal/conf/server.go#L140:17
Thank you!