mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
The previous approach to enable race detection was too radical and accidently led to build our binaries with the race flage enabled, which caused issues when building images down the line. This happened because putting a `test --something` in bazelrc also sets it on `build` which is absolutely not what we wanted. Usually folks get this one working by having a `--stamp` config setting that fixes this when releasing binaries, which we don't at this stage, as we're still learning Bazel. Luckily, this was caught swiftly. The current approach insteads takes a more granular approach, which makes the `go_test` rule uses our own variant, which injects the `race = "on"` attribute, but only on `go_test`. ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> CI, being a main-dry-run, this will cover the container building jobs, which were the ones failing. --------- Co-authored-by: Alex Ostrikov <alex.ostrikov@sourcegraph.com> |
||
|---|---|---|
| .. | ||
| examples | ||
| .gitignore | ||
| BUILD.bazel | ||
| build.sh | ||
| docker-publish.sh | ||
| Dockerfile | ||
| entry.sh | ||
| main_test.go | ||
| main.go | ||
| release.sh | ||
| serve_test.go | ||
| serve.go | ||
| snapshot.go | ||