Skip to content

config file override fixes + improvements

Warren Gifford requested to merge sg/cfg-file-fixes into master

Created by: slimsag

This PR:

  1. 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).
  2. Removes an incorrect "Dev" label applied to EXTSVC_CONFIG_FILE-created services
  3. 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).
  4. Improves error messages returned by config override files.
  5. 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)

Merge request reports

Loading