-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75585: ci: update pebble metamorphic nightly to use bazel r=nicktrav a=rickystewart Closes #67335. Release note: None Co-authored-by: Ricky Stewart <[email protected]>
- Loading branch information
Showing
10 changed files
with
110 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1216,8 +1216,13 @@ def go_deps(): | |
) | ||
go_repository( | ||
name = "com_github_cockroachdb_pebble", | ||
build_directives = ["gazelle:build_tags invariants"], | ||
build_file_proto_mode = "disable_global", | ||
importpath = "github.com/cockroachdb/pebble", | ||
patch_args = ["-p1"], | ||
patches = [ | ||
"@cockroach//build/patches:com_github_cockroachdb_pebble.patch", | ||
], | ||
sha256 = "0018bcef357bf7bba06d5e3eb35277709b5fd98ee437924001531fa935d8c76d", | ||
strip_prefix = "github.com/cockroachdb/[email protected]", | ||
urls = [ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -urN a/internal/invariants/BUILD.bazel b/internal/invariants/BUILD.bazel | ||
--- a/internal/invariants/BUILD.bazel 1969-12-31 19:00:00.000000000 -0500 | ||
+++ b/internal/invariants/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000 | ||
@@ -5,6 +5,7 @@ | ||
srcs = [ | ||
"finalizer_off.go", | ||
"finalizer_on.go", | ||
+ "off.go", | ||
"on.go", | ||
"race_off.go", | ||
"race_on.go", |
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
build/teamcity/cockroach/nightlies/pebble_nightly_metamorphic.sh
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,40 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script is run by the Pebble Nightly Metamorphic - TeamCity build | ||
# configuration. | ||
|
||
set -euo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" | ||
|
||
source "$dir/teamcity-support.sh" # For $root | ||
source "$dir/teamcity-bazel-support.sh" # For run_bazel | ||
|
||
mkdir -p artifacts | ||
|
||
# Pull in the latest version of Pebble from upstream. The benchmarks run | ||
# against the tip of the 'master' branch. We do this by `go get`ting the | ||
# latest version of the module, and then running `mirror` to update `DEPS.bzl` | ||
# accordingly. | ||
bazel run @go_sdk//:bin/go get github.com/cockroachdb/pebble@latest | ||
NEW_DEPS_BZL_CONTENT=$(bazel run //pkg/cmd/mirror) | ||
echo "$NEW_DEPS_BZL_CONTENT" > DEPS.bzl | ||
|
||
PEBBLE_SUM=$(grep 'version =' DEPS.bzl | cut -d'"' -f2) | ||
echo "Pebble module sum: $PEBBLE_SUM" | ||
|
||
env=( | ||
"GITHUB_REPO=$GITHUB_REPO" | ||
"GITHUB_API_TOKEN=$GITHUB_API_TOKEN" | ||
"BUILD_VCS_NUMBER=$PEBBLE_SUM" | ||
"TC_BUILD_ID=$TC_BUILD_ID" | ||
"TC_SERVER_URL=$TC_SERVER_URL" | ||
"TC_BUILD_BRANCH=$TC_BUILD_BRANCH" | ||
"PKG=internal/metamorphic" | ||
"STRESSFLAGS=-maxtime 3h -maxfails 1 -stderr -p 1" | ||
"TZ=America/New_York" | ||
) | ||
|
||
BAZEL_SUPPORT_EXTRA_DOCKER_ARGS="-e BUILD_VCS_NUMBER=$PEBBLE_SUM -e GITHUB_API_TOKEN -e GITHUB_REPO -e TC_BUILD_BRANCH -e TC_BUILD_ID -e TC_SERVER_URL" \ | ||
run_bazel build/teamcity/cockroach/nightlies/pebble_nightly_metamorphic_impl.sh | ||
|
34 changes: 34 additions & 0 deletions
34
build/teamcity/cockroach/nightlies/pebble_nightly_metamorphic_impl.sh
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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" | ||
source "$dir/teamcity-bazel-support.sh" # For process_test_json | ||
|
||
set -euxo pipefail | ||
ARTIFACTS_DIR=/artifacts/meta | ||
mkdir -p $ARTIFACTS_DIR | ||
GO_TEST_JSON_OUTPUT_FILE=/artifacts/test.json.txt | ||
|
||
bazel build //pkg/cmd/bazci //pkg/cmd/github-post //pkg/cmd/testfilter --config=ci | ||
|
||
BAZEL_BIN=$(bazel info bazel-bin --config ci) | ||
|
||
exit_status=0 | ||
# NB: If adjusting the metamorphic test flags below, be sure to also update | ||
# pkg/cmd/github-post/main.go to ensure the GitHub issue poster includes the | ||
# correct flags in the reproduction command. | ||
$BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci --config=ci test \ | ||
@com_github_cockroachdb_pebble//internal/metamorphic:metamorphic_test -- \ | ||
--test_timeout=11000 '--test_filter=TestMeta$' \ | ||
--define gotags=bazel,invariants \ | ||
"--test_env=GO_TEST_JSON_OUTPUT_FILE=$GO_TEST_JSON_OUTPUT_FILE" \ | ||
--run_under "@com_github_cockroachdb_stress//:stress -bazel -shardable-artifacts 'GO_TEST_JSON_OUTPUT_FILE=cat,XML_OUTPUT_FILE=$BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci merge-test-xmls' -maxtime 3h -maxfails 1 -stderr -p 1" \ | ||
--test_arg -dir --test_arg $ARTIFACTS_DIR \ | ||
--test_arg -ops --test_arg "uniform:5000-25000" \ | ||
|| exit_status=$? | ||
|
||
process_test_json \ | ||
$BAZEL_BIN/pkg/cmd/testfilter/testfilter_/testfilter \ | ||
$BAZEL_BIN/pkg/cmd/github-post/github-post_/github-post \ | ||
/artifacts $GO_TEST_JSON_OUTPUT_FILE $exit_status | ||
|
||
exit $exit_status |
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