From 743018ee671b1576b5bf2292d159fcb9849e70c8 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 1 Nov 2024 11:28:46 -0400 Subject: [PATCH 1/3] add kokoro scripts --- .kokoro/conformance.sh | 7 +++++++ testproxy/known_failures.txt | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 testproxy/known_failures.txt diff --git a/.kokoro/conformance.sh b/.kokoro/conformance.sh index 777cc4aef..3fdda019e 100755 --- a/.kokoro/conformance.sh +++ b/.kokoro/conformance.sh @@ -40,6 +40,13 @@ popd cd cloud-bigtable-clients-test/tests eval "go test -v -proxy_addr=:9999" RETURN_CODE=$? +popd + +# Stop the proxy +kill $proxyPID + +# fix output location of logs +bash .kokoro/coerce_logs.sh echo "exiting with ${RETURN_CODE}" exit ${RETURN_CODE} \ No newline at end of file diff --git a/testproxy/known_failures.txt b/testproxy/known_failures.txt new file mode 100644 index 000000000..47c95b2fb --- /dev/null +++ b/testproxy/known_failures.txt @@ -0,0 +1,17 @@ +TestMutateRow_Generic_Headers, +TestMutateRow_Generic_DeadlineExceeded, +TestMutateRows_Generic_CloseClient, +TestMutateRows_Retry_WithRoutingCookie, +TestReadModifyWriteRow_Generic_Headers, +TestReadModifyWriteRow_NoRetry_TransientError, +TestReadModifyWriteRow_Generic_DeadlineExceeded, +TestReadRow_Generic_DeadlineExceeded, +TestReadRow_Retry_WithRoutingCookie, +TestReadRow_Retry_WithRetryInfo, +TestReadRows_ReverseScans_FeatureFlag_Enabled, +TestReadRows_NoRetry_OutOfOrderError_Reverse, +TestReadRows_Retry_PausedScan, +TestReadRows_Retry_LastScannedRow, +TestReadRows_Retry_LastScannedRow_Reverse, +TestCheckAndMutateRow_NoRetry_TransientError, +TestCheckAndMutateRow_Generic_DeadlineExceeded, \ No newline at end of file From 8bc51cd10aae6539fbb98debd6eb5a0216262e06 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 1 Nov 2024 11:39:55 -0400 Subject: [PATCH 2/3] fix kokoro script and clean up failure logs --- .kokoro/conformance.sh | 4 ---- testproxy/known_failures.txt | 18 +----------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.kokoro/conformance.sh b/.kokoro/conformance.sh index 3fdda019e..6763daa45 100755 --- a/.kokoro/conformance.sh +++ b/.kokoro/conformance.sh @@ -40,10 +40,6 @@ popd cd cloud-bigtable-clients-test/tests eval "go test -v -proxy_addr=:9999" RETURN_CODE=$? -popd - -# Stop the proxy -kill $proxyPID # fix output location of logs bash .kokoro/coerce_logs.sh diff --git a/testproxy/known_failures.txt b/testproxy/known_failures.txt index 47c95b2fb..cce1bd7fa 100644 --- a/testproxy/known_failures.txt +++ b/testproxy/known_failures.txt @@ -1,17 +1 @@ -TestMutateRow_Generic_Headers, -TestMutateRow_Generic_DeadlineExceeded, -TestMutateRows_Generic_CloseClient, -TestMutateRows_Retry_WithRoutingCookie, -TestReadModifyWriteRow_Generic_Headers, -TestReadModifyWriteRow_NoRetry_TransientError, -TestReadModifyWriteRow_Generic_DeadlineExceeded, -TestReadRow_Generic_DeadlineExceeded, -TestReadRow_Retry_WithRoutingCookie, -TestReadRow_Retry_WithRetryInfo, -TestReadRows_ReverseScans_FeatureFlag_Enabled, -TestReadRows_NoRetry_OutOfOrderError_Reverse, -TestReadRows_Retry_PausedScan, -TestReadRows_Retry_LastScannedRow, -TestReadRows_Retry_LastScannedRow_Reverse, -TestCheckAndMutateRow_NoRetry_TransientError, -TestCheckAndMutateRow_Generic_DeadlineExceeded, \ No newline at end of file +TestMutateRow_Generic_Headers\|TestMutateRow_Generic_DeadlineExceeded|TestMutateRows_Generic_CloseClient\|TestMutateRows_Retry_WithRoutingCookie\|TestReadModifyWriteRow_Generic_Headers\|TestReadModifyWriteRow_NoRetry_TransientError\|TestReadModifyWriteRow_Generic_DeadlineExceeded\|TestReadRow_Generic_DeadlineExceeded\|TestReadRow_Retry_WithRoutingCookie\|TestReadRow_Retry_WithRetryInfo\|TestReadRows_ReverseScans_FeatureFlag_Enabled\|TestReadRows_NoRetry_OutOfOrderError_Reverse\|TestReadRows_Retry_PausedScan\|TestReadRows_Retry_LastScannedRow\|TestReadRows_Retry_LastScannedRow_Reverse\|TestCheckAndMutateRow_NoRetry_TransientError\|TestCheckAndMutateRow_Generic_DeadlineExceeded \ No newline at end of file From fc08cd29dae25984eb2081e0a870eb9e64759132 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 1 Nov 2024 11:58:08 -0400 Subject: [PATCH 3/3] add coerce logs script --- .kokoro/coerce_logs.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .kokoro/coerce_logs.sh diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100644 index 000000000..883ee0faa --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done \ No newline at end of file