Skip to content

Commit

Permalink
Merge #55505 #55516
Browse files Browse the repository at this point in the history
55505: build: fix builds using grep to match a string. r=pbardea a=jlinder

Before: `grep -Eo` was used in a couple places in release scripts
where it might not find the string being searched for, the non-zero
return code wasn't handled and the script should have continued
executing.

Why: The release scripts were erroring out when they should have
continued executing.

Now: The non-zero return code is handled by adding a `|| echo""` to the
commands.

This was discovered by PR #54661 causing master to fail builds in Make
and Publish Build.

Release note: None

55516: roachtest: temporarily omit testing setting in sqlsmith r=yuzefovich a=yuzefovich

Recently introduced `testing_vectorize_inject_panics` testing session
variable is only supported on master branch, so we need to gate its
usage based on the version. However, 21.1 version hasn't been minted
yet, so we temporarily disable the setting's usage.

Fixes: #55482.

Release note: None

Co-authored-by: James H. Linder <jamesl@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
  • Loading branch information
3 people committed Oct 13, 2020
3 parents a2ddfb5 + 5082492 + dd5b106 commit df7daec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build/release/teamcity-make-and-publish-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ export BUILDER_HIDE_GOPATH_SRC=1

build/builder.sh make .buildinfo/tag
build_name="${TAG_NAME:-$(cat .buildinfo/tag)}"
release_branch="$(echo "$build_name" | grep -Eo "^v[0-9]+\.[0-9]+")"
is_custom_build="$(echo "$TC_BUILD_BRANCH" | grep -Eo "^custombuild-")"

# On no match, `grep -Eo` returns 1. `|| echo""` makes the script not error.
release_branch="$(echo "$build_name" | grep -Eo "^v[0-9]+\.[0-9]+" || echo"")"
is_custom_build="$(echo "$TC_BUILD_BRANCH" | grep -Eo "^custombuild-" || echo "")"

if [[ -z "${DRY_RUN}" ]] ; then
bucket="${BUCKET-cockroach-builds}"
Expand Down
4 changes: 3 additions & 1 deletion build/release/teamcity-mark-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ source "$(dirname "${0}")/teamcity-support.sh"
mark_build() {
tc_start_block "Variable Setup"
build_label=$1
release_branch="$(echo "$TC_BUILD_BRANCH" | grep -Eo "^v[0-9]+\.[0-9]+")"

# On no match, `grep -Eo` returns 1. `|| echo""` makes the script not error.
release_branch="$(echo "$TC_BUILD_BRANCH" | grep -Eo "^v[0-9]+\.[0-9]+" || echo"")"

if [[ -z "${DRY_RUN}" ]] ; then
google_credentials=$GOOGLE_COCKROACH_CLOUD_IMAGES_CREDENTIALS
Expand Down
6 changes: 5 additions & 1 deletion pkg/cmd/roachtest/sqlsmith.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ func registerSQLSmith(r *testRegistry) {
// We will enable panic injection on this connection in the vectorized
// engine (and will ignore the injected errors) in order to test that
// the panic-catching mechanism of error propagation works as expected.
setup += "SET testing_vectorize_inject_panics=true;"
// TODO(yuzefovich): this setting is only supported on master (i.e.
// after 20.2 version), so we need to gate it, yet we can't do so
// because 21.1 version hasn't been minted yet. We skip this check for
// now.
//setup += "SET testing_vectorize_inject_panics=true;"

conn := c.Conn(ctx, 1)
t.Status("executing setup")
Expand Down

0 comments on commit df7daec

Please sign in to comment.