config file override fixes + improvements
Created by: slimsag
This PR:
- Fixes a deadlock that was introduced when specifying
EXTSVC_CONFIG_FILE
(caught by our deadlock detector in dev environments https://github.com/sourcegraph/sourcegraph/issues/4123). - Removes an incorrect "Dev" label applied to
EXTSVC_CONFIG_FILE
-created services - Fixes the previously extremely poor behavior of
EXTSVC_CONFIG_FILE
where it would do nothing if you have external services already (see https://github.com/sourcegraph/sourcegraph/commit/d3a714eb8d35ffb6df949eeeed34b0a8e7246e75 for why this sucked particularly bad in dev environments, too). - Improves error messages returned by config override files.
- Prevents updates to extsvc/site/critical configs when they are loaded from a file (the latter requires setting an env var on the management console). This does not apply in dev mode.
My intent is to cherry-pick for release in 3.4.1.
Supercedes #4126 (in particular the first commit b46bc7d does) Fixes #4123 (closed) Fixes #4108 (closed)
Test plan: manual (very difficult to test automatically currently)