treewide: add race-detector config
This also disables all `pure = "on"` attributes as they propagate too
far and break the race detector because rules_go contradicts itself by
forcing pure go even when CGO is required by the race detector. We build
everything for our node images static and pure via a transition anyway,
so this is actually fine.
Change-Id: I5cd3879fba4258caa94df4dbea5c6472867b7e34
Reviewed-on: https://review.monogon.dev/c/monogon/+/3725
Tested-by: Jenkins CI
Reviewed-by: Hendrik Hofstadt <hendrik@monogon.tech>
diff --git a/metropolis/node/core/BUILD.bazel b/metropolis/node/core/BUILD.bazel
index b7d10af..4f15dea 100644
--- a/metropolis/node/core/BUILD.bazel
+++ b/metropolis/node/core/BUILD.bazel
@@ -61,6 +61,5 @@
go_binary(
name = "core",
embed = [":core_lib"],
- pure = "on", # keep
visibility = ["//metropolis/node:__pkg__"],
)
diff --git a/metropolis/node/core/network/dhcp4c/BUILD.bazel b/metropolis/node/core/network/dhcp4c/BUILD.bazel
index 24dbe83..34f2a23 100644
--- a/metropolis/node/core/network/dhcp4c/BUILD.bazel
+++ b/metropolis/node/core/network/dhcp4c/BUILD.bazel
@@ -29,7 +29,6 @@
"lease_test.go",
],
embed = [":dhcp4c"],
- pure = "on",
deps = [
"//metropolis/node/core/network/dhcp4c/transport",
"@com_github_cenkalti_backoff_v4//:backoff",
diff --git a/metropolis/node/core/network/dhcp4c/callback/BUILD.bazel b/metropolis/node/core/network/dhcp4c/callback/BUILD.bazel
index 2091f6b..b6659ba 100644
--- a/metropolis/node/core/network/dhcp4c/callback/BUILD.bazel
+++ b/metropolis/node/core/network/dhcp4c/callback/BUILD.bazel
@@ -22,7 +22,6 @@
name = "callback_test",
srcs = ["callback_test.go"],
embed = [":callback"],
- pure = "on",
deps = [
"//metropolis/node/core/network/dhcp4c",
"@com_github_google_go_cmp//cmp",
diff --git a/metropolis/node/kubernetes/hyperkube/BUILD.bazel b/metropolis/node/kubernetes/hyperkube/BUILD.bazel
index 3c4e31b..406ec7d 100644
--- a/metropolis/node/kubernetes/hyperkube/BUILD.bazel
+++ b/metropolis/node/kubernetes/hyperkube/BUILD.bazel
@@ -1,5 +1,5 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@//third_party/go:kubernetes_version_def.bzl", "version_x_defs")
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "hyperkube_lib",
@@ -21,7 +21,6 @@
go_binary(
name = "hyperkube",
embed = [":hyperkube_lib"],
- pure = "on",
visibility = ["//metropolis/node:__pkg__"],
x_defs = version_x_defs(),
)