-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
69093: kvserver: remove unused args from r.evaluateCommand r=andreimatei a=andreimatei Release note: None 69104: colexecwindow: remove unnecessary copy from relative rank operators r=DrewKimball a=DrewKimball Previously, relative rank window function operators performed an unnecessary copy on input batches - this was an artifact from when `SpillingQueue` retained references to enqueued batches. This patch removes the copy. Release note: None 69111: rfcs: update ON UPDATE RFC to note syntax change r=mgartner,otan a=pawalt After starting ON UPDATE implementation, we realized we had a problem with syntax ambiguity. We've moved to slightly different syntax as a result. This PR updates the RFC to match the current state of the implementation. Release note: None 69112: bazel: add bazel testrace CI job r=rail a=rickystewart Also some light refactoring: add a `--config race` and use that instead of directly referencing the `--@io_bazel_rules_go//go/config:race` flag. Also add `GORACE=halt_on_error=1` to the test environment when running under `--config race` -- this makes the behavior match up more closely to the `Makefile`. Closes #67145. Release note: None Co-authored-by: Andrei Matei <[email protected]> Co-authored-by: Drew Kimball <[email protected]> Co-authored-by: Peyton Walters <[email protected]> Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
9 changed files
with
111 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname $(dirname "${0}")))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root | ||
source "$dir/teamcity-bazel-support.sh" # For run_bazel | ||
|
||
tc_prepare | ||
|
||
tc_start_block "Determine changed packages" | ||
if tc_release_branch; then | ||
pkgspec=./pkg/... | ||
echo "On release branch ($TC_BUILD_BRANCH), so running testrace on all packages ($pkgspec)" | ||
else | ||
pkgspec=$(changed_go_pkgs) | ||
if [[ $(echo "$pkgspec" | wc -w) -gt 10 ]]; then | ||
echo "PR #$TC_BUILD_BRANCH changed many packages; skipping race detector tests" | ||
exit 0 | ||
elif [[ -z "$pkgspec" ]]; then | ||
echo "PR #$TC_BUILD_BRANCH has no changed packages; skipping race detector tests" | ||
exit 0 | ||
fi | ||
if [[ $pkgspec == *"./pkg/sql/opt"* ]]; then | ||
# If one opt package was changed, run all opt packages (the optimizer puts | ||
# various checks behind the race flag to keep them out of release builds). | ||
echo "$pkgspec" | sed 's$./pkg/sql/opt/[^ ]*$$g' | ||
pkgspec=$(echo "$pkgspec" | sed 's$./pkg/sql/opt[^ ]*$$g') | ||
pkgspec="$pkgspec ./pkg/sql/opt/..." | ||
fi | ||
echo "PR #$TC_BUILD_BRANCH has changed packages; running race detector tests on $pkgspec" | ||
fi | ||
tc_end_block "Determine changed packages" | ||
|
||
tc_start_block "Run race detector tests" | ||
run_bazel build/teamcity/cockroach/ci/tests/testrace_impl.sh $pkgspec | ||
tc_end_block "Run race detector tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
# Usage: testrace_impl.sh PKG1 [PKG2 PKG3 PKG4...] | ||
# packages are expected to be formatted as go-style, e.g. ./pkg/cmd/bazci. | ||
|
||
bazel build //pkg/cmd/bazci --config=ci | ||
for pkg in "$@" | ||
do | ||
# Query to list all affected tests. | ||
pkg=${pkg#"./"} | ||
if [[ $(basename $pkg) != ... ]] | ||
then | ||
pkg="$pkg:all" | ||
fi | ||
tests=$(bazel query "kind(go_test, $pkg)" --output=label) | ||
|
||
# Run affected tests. | ||
for test in "$tests" | ||
do | ||
$(bazel info bazel-bin)/pkg/cmd/bazci/bazci_/bazci --config ci --config race test "$test" -- \ | ||
--test_env=COCKROACH_LOGIC_TESTS_SKIP=true \ | ||
--test_env=GOMAXPROCS=8 | ||
done | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters