Skip to content

Revert "Revert "Add a ready mechanism to the conf pkg""

Created by: vrto

Description

Reverts sourcegraph/sourcegraph#32420 and tweaks the original solution with the following fix.

Problem

symbols-enterprise runs, but it's deadlocked, unable to process requests.

We've moved continuous conf updates to conf.Init call that must be called explicitly. However enterprise/symbols/Main accepts an optional hook that's in this cased invoked if USE_ROCKSKIP environment variable is set to true. This hook assumed it could call conf.Get, but that call wasn't safe as conf.Init must be called before calling the former.

Solution

Refactor enterprise symbols to Invoke conf.Init before calling the setup set up hook.

During our pairing session with @jhchabran, we've also realized that we don't have sufficient feedback for identifying similar errors locally. sg does run the command but does not report anything if the command isn't healthy (deadlocked like in our case). We agreed that adding simple health checking to our local sg would be beneficial, so we'd spot this error earlier.

Test plan

  • manual pairing QA session - we've tested this both locally with sg and using our dogfood k8s instance
  • we've identified the need to expand sg with the health-checking capability

Merge request reports

Loading