Skip to content

Commit

Permalink
teamcity-trigger: ensure that race tag is only passed once
Browse files Browse the repository at this point in the history
By running under `-race`, the go command defines the `race`
build tag for us [1].

Previously, we defined it under `TAGS` to let the issue poster
know that this is a failure under `race` and indicate that in
the issue.

At the time, defining the tag twice didn't cause issues
but after cockroachdb#109773, it led to build failures [2].

To reproduce locally:
```
bazel test -s --config=race pkg/util/ctxgroup:all --test_env=GOTRACEBACK=all --define gotags=bazel,gss,race
```

As a follow-up, we should find another way to let the issue
poster know that a failure was running under `race`.

[1] https://go.dev/doc/articles/race_detector#Excluding_Tests
[2] cockroachdb#109994 (comment)

Epic: none
Release note: None
  • Loading branch information
healthy-pod committed Sep 9, 2023
1 parent b5836a5 commit d99f8d5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/cmd/teamcity-trigger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ func runTC(queueBuild func(string, map[string]string)) {
opts["env.EXTRA_BAZEL_FLAGS"] = fmt.Sprintf("%s --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=1", extraBazelFlags)
opts["env.STRESSFLAGS"] = fmt.Sprintf("-maxruns %d -maxtime %s -maxfails %d -p %d",
maxRuns, maxTime, maxFails, noParallelism)
opts["env.TAGS"] = "race"
queueBuildThenWait(buildID, opts)
delete(opts, "env.TAGS")
}
Expand Down

0 comments on commit d99f8d5

Please sign in to comment.