Skip to content

dev/sg: fix diff output in Buildkite without using Buildkite condition

Warren Gifford requested to merge fix-buildkite-diff-render into main

Created by: bobheadxi

Closes https://github.com/sourcegraph/sourcegraph/issues/35918 , reverts https://github.com/sourcegraph/sourcegraph/pull/36043

The root cause seems to be termenv.IsDarkBackground() hanging indefinitely in Buildkite. To work around this:

  1. Add ForceDarkBackground output option, set to true in Buildkite
  2. Refactor output capabilities detection to be lazy (if an override is set, do not do any detection at all)
  3. Change most usages of output.NewOutput to std.NewOutput for consistency and to avoid the problematic dark background detection

Test plan

See test failure: https://buildkite.com/sourcegraph/sourcegraph/builds/150395#_

image

Merge request reports

Loading