diff --git a/build/root/.bazelrc b/build/root/.bazelrc index a7f69ce6f3a..a0eab2ccdcb 100644 --- a/build/root/.bazelrc +++ b/build/root/.bazelrc @@ -17,3 +17,6 @@ build --sandbox_fake_username # TODO(ixdy): Remove this default once rules_go is bumped. # Ref kubernetes/kubernetes#52677 build --incompatible_comprehension_variables_do_not_leak=false + +# Enable go race detection. +test --features=race diff --git a/pkg/master/BUILD b/pkg/master/BUILD index d9e1d598132..057da62edb9 100644 --- a/pkg/master/BUILD +++ b/pkg/master/BUILD @@ -112,6 +112,7 @@ go_test( "master_openapi_test.go", "master_test.go", ], + features = ["-race"], library = ":go_default_library", deps = [ "//pkg/api:go_default_library", diff --git a/staging/src/k8s.io/client-go/tools/cache/BUILD b/staging/src/k8s.io/client-go/tools/cache/BUILD index 65deccf7c23..94e020d8a56 100644 --- a/staging/src/k8s.io/client-go/tools/cache/BUILD +++ b/staging/src/k8s.io/client-go/tools/cache/BUILD @@ -22,6 +22,7 @@ go_test( "store_test.go", "undelta_store_test.go", ], + features = ["-race"], library = ":go_default_library", deps = [ "//vendor/github.com/google/gofuzz:go_default_library",