From 887b80d8aa1fab644163047fc9fca215b380b077 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 11:17:22 -0500 Subject: [PATCH 01/24] chore: run both rounds in a single script --- .github/workflows/downstream.yaml | 146 +++++++++++++++++++++ .kokoro/downstream-client-library-check.sh | 85 ++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 .github/workflows/downstream.yaml create mode 100644 .kokoro/downstream-client-library-check.sh diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml new file mode 100644 index 0000000000..04402c4b3d --- /dev/null +++ b/.github/workflows/downstream.yaml @@ -0,0 +1,146 @@ +on: + push: + branches: + - main + pull_request: +name: downstream +jobs: + dependencies: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [17] + repo: + - accessapproval + - accesscontextmanager + - aiplatform + - analytics-admin + - analytics-data + - api-gateway + - apigee-connect + - appengine-admin + - area120-tables + - artifact-registry + - asset + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigquerystorage + - bigtable + - bigtable-hbase + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsub + - pubsublite + - pubsublite-flink + - pubsublite-kafka + - pubsublite-spark + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: sudo apt-get install libxml2-utils + - run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} \ No newline at end of file diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh new file mode 100644 index 0000000000..888ea37668 --- /dev/null +++ b/.kokoro/downstream-client-library-check.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# Copyright 2020 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. + +# Presubmit to ensure the dependencies of the Google Libraries BOM, with the modification of change +# in the PR, pick up the highest versions among transitive dependencies. +# https://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html +set -eo pipefail +# Display commands being run. +set -x + +REPO=$1 +## 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}/.. + +# Make java-core artifacts available for 'mvn validate' at the bottom +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q + +# Read the current version of this java-core in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +CORE_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` + +if [ -z "${CORE_VERSION}" ]; then + echo "Version is not found in ${CORE_VERSION_POM}" + exit 1 +fi +echo "Version: ${CORE_VERSION}" + +# Round 1 +# Check this java-core against HEAD of java-shared dependencies + +git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +pushd java-shared-dependencies/first-party-dependencies + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-core-bom"] +cd ../x:version +set ${CORE_VERSION} +save pom.xml +EOF + +# run dependencies script +cd .. +mvn -Denforcer.skip=true clean install + +SHARED_DEPS_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` + +if [ -z "${SHARED_DEPS_VERSION}" ]; then + echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" + exit 1 +fi + +# Round 2 + +# Check this BOM against a few java client libraries +git clone "https://github.com/googleapis/java-${REPO}.git" --depth=1 +pushd ${REPO} +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +cd ../x:version +set ${SHARED_DEPS_VERSION} +save pom.xml +EOF + +mvn -Denforcer.skip=true clean install From a5b78736f1eb566fdee59c9510d8a456a17dcf19 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 11:20:38 -0500 Subject: [PATCH 02/24] chore: make script executable --- .kokoro/downstream-client-library-check.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .kokoro/downstream-client-library-check.sh diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh old mode 100644 new mode 100755 From d6819ad5f52f25a4d4e3f18ba583c99894e07bd3 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 11:24:57 -0500 Subject: [PATCH 03/24] typo --- .kokoro/downstream-client-library-check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 888ea37668..3467b6584b 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -72,7 +72,7 @@ fi # Check this BOM against a few java client libraries git clone "https://github.com/googleapis/java-${REPO}.git" --depth=1 -pushd ${REPO} +pushd java-${REPO} # replace version xmllint --shell <(cat pom.xml) << EOF setns x=http://maven.apache.org/POM/4.0.0 From 21ab7edfd2205903f40caa058027b44722380e30 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 11:40:13 -0500 Subject: [PATCH 04/24] chore: add exception for bigtable --- .github/workflows/downstream.yaml | 4 ---- .kokoro/downstream-client-library-check.sh | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 04402c4b3d..045b7a367c 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -32,7 +32,6 @@ jobs: - bigqueryreservation - bigquerystorage - bigtable - - bigtable-hbase - billing - billingbudgets - binary-authorization @@ -96,9 +95,6 @@ jobs: - profiler - pubsub - pubsublite - - pubsublite-flink - - pubsublite-kafka - - pubsublite-spark - recaptchaenterprise - recommendations-ai - recommender diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 3467b6584b..0729a603dc 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -73,6 +73,11 @@ fi # Check this BOM against a few java client libraries git clone "https://github.com/googleapis/java-${REPO}.git" --depth=1 pushd java-${REPO} + +if [ $REPO = "bigtable"]; then + pushd google-cloud-bigtable-deps-bom +fi + # replace version xmllint --shell <(cat pom.xml) << EOF setns x=http://maven.apache.org/POM/4.0.0 @@ -82,4 +87,8 @@ set ${SHARED_DEPS_VERSION} save pom.xml EOF +if [ $REPO = "bigtable"]; then + popd +fi + mvn -Denforcer.skip=true clean install From 403eee2f19e13fc13dfde3e1ee42103847175526 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 11:57:54 -0500 Subject: [PATCH 05/24] chore: typo --- .kokoro/downstream-client-library-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 0729a603dc..53c074a2e4 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -74,7 +74,7 @@ fi git clone "https://github.com/googleapis/java-${REPO}.git" --depth=1 pushd java-${REPO} -if [ $REPO = "bigtable"]; then +if [[ $REPO == "bigtable" ]]; then pushd google-cloud-bigtable-deps-bom fi @@ -87,7 +87,7 @@ set ${SHARED_DEPS_VERSION} save pom.xml EOF -if [ $REPO = "bigtable"]; then +if [[ $REPO == "bigtable" ]]; then popd fi From 49e44ff1def0b7bf444f7a24ebc6a9a0938c0ec4 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Mon, 8 Nov 2021 12:34:25 -0500 Subject: [PATCH 06/24] chore: remove pubsub and BQstorage for testing --- .github/workflows/downstream.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 045b7a367c..6fff3de7b3 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -30,7 +30,6 @@ jobs: - bigquerydatatransfer - bigquerymigration - bigqueryreservation - - bigquerystorage - bigtable - billing - billingbudgets @@ -93,7 +92,6 @@ jobs: - policy-troubleshooter - private-catalog - profiler - - pubsub - pubsublite - recaptchaenterprise - recommendations-ai From 9060073d398de8454018bcc01412d7a0e959b692 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Wed, 29 Dec 2021 13:08:06 -0500 Subject: [PATCH 07/24] chore: only run checks if labelled --- .github/workflows/downstream.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 6fff3de7b3..4203349d21 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -1,11 +1,12 @@ on: - push: + pull_request: + types: [ labeled ] branches: - main - pull_request: name: downstream jobs: dependencies: + if: ${{ github.event.label.name == 'downstream-check:run' }} runs-on: ubuntu-latest strategy: fail-fast: false From df852b33676940e6db89ebb2240feec8b789bb86 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 18 Jan 2022 20:20:30 -0500 Subject: [PATCH 08/24] chore: generalise script --- .github/workflows/downstream.yaml | 2 +- .kokoro/downstream-client-library-check.sh | 27 +++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 4203349d21..dc3dbfe39f 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -138,4 +138,4 @@ jobs: java-version: ${{matrix.java}} - run: java -version - run: sudo apt-get install libxml2-utils - - run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} \ No newline at end of file + - run: .kokoro/downstream-client-library-check.sh google-cloud-core ${{matrix.repo}} \ No newline at end of file diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 53c074a2e4..2b4e605646 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,23 +13,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Presubmit to ensure the dependencies of the Google Libraries BOM, with the modification of change -# in the PR, pick up the highest versions among transitive dependencies. -# https://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html set -eo pipefail # Display commands being run. set -x -REPO=$1 + +CORE_LIBRARY_ARTIFACT=$1 +CLIENT_LIBRARY=$2 ## 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}/.. -# Make java-core artifacts available for 'mvn validate' at the bottom +# Make java core library artifacts available for 'mvn validate' at the bottom mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q -# Read the current version of this java-core in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' CORE_VERSION_POM=pom.xml # Namespace (xmlns) prevents xmllint from specifying tag names in XPath CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` @@ -41,7 +40,7 @@ fi echo "Version: ${CORE_VERSION}" # Round 1 -# Check this java-core against HEAD of java-shared dependencies +# Check this java core library against HEAD of java-shared dependencies git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 pushd java-shared-dependencies/first-party-dependencies @@ -49,7 +48,7 @@ pushd java-shared-dependencies/first-party-dependencies # replace version xmllint --shell <(cat pom.xml) << EOF setns x=http://maven.apache.org/POM/4.0.0 -cd .//x:artifactId[text()="google-cloud-core-bom"] +cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] cd ../x:version set ${CORE_VERSION} save pom.xml @@ -70,11 +69,11 @@ fi # Round 2 -# Check this BOM against a few java client libraries -git clone "https://github.com/googleapis/java-${REPO}.git" --depth=1 -pushd java-${REPO} +# Check this BOM against java client libraries +git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +pushd java-${CLIENT_LIBRARY} -if [[ $REPO == "bigtable" ]]; then +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then pushd google-cloud-bigtable-deps-bom fi @@ -87,7 +86,7 @@ set ${SHARED_DEPS_VERSION} save pom.xml EOF -if [[ $REPO == "bigtable" ]]; then +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then popd fi From e917ce7688d78fef6ee158b47d8a75c9bb8d9671 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 18 Jan 2022 20:32:01 -0500 Subject: [PATCH 09/24] chore: fix typo --- .github/workflows/downstream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index dc3dbfe39f..12e0160ebe 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -138,4 +138,4 @@ jobs: java-version: ${{matrix.java}} - run: java -version - run: sudo apt-get install libxml2-utils - - run: .kokoro/downstream-client-library-check.sh google-cloud-core ${{matrix.repo}} \ No newline at end of file + - run: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} \ No newline at end of file From 878468103d52ae77c5df1ce881e1c307e78c954b Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Wed, 19 Jan 2022 16:30:35 -0500 Subject: [PATCH 10/24] chore: add retry option --- .github/workflows/downstream.yaml | 241 +++++++++--------- .../java/com/google/cloud/IdentityTest.java | 6 + 2 files changed, 129 insertions(+), 118 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 12e0160ebe..80cd2c4852 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -14,123 +14,123 @@ jobs: java: [17] repo: - accessapproval - - accesscontextmanager - - aiplatform - - analytics-admin - - analytics-data - - api-gateway - - apigee-connect - - appengine-admin - - area120-tables - - artifact-registry - - asset - - assured-workloads - - automl - - bigquery - - bigqueryconnection - - bigquerydatatransfer - - bigquerymigration - - bigqueryreservation - - bigtable - - billing - - billingbudgets - - binary-authorization - - channel - - cloudbuild - - compute - - contact-center-insights - - container - - containeranalysis - - data-fusion - - datacatalog - - dataflow - - datalabeling - - dataproc - - dataproc-metastore - - datastore - - datastream - - debugger-client - - deploy - - dialogflow - - dialogflow-cx - - dlp - - dms - - dns - - document-ai - - domains - - errorreporting - - essential-contacts - - eventarc - - filestore - - firestore - - functions - - game-servers - - gke-connect-gateway - - gkehub - - gsuite-addons - - iam-admin - - iamcredentials - - iot - - kms - - language - - life-sciences - - logging - - logging-logback - - managed-identities - - mediatranslation - - memcache - - monitoring - - monitoring-dashboards - - network-management - - network-security - - networkconnectivity - - notebooks - - orchestration-airflow - - orgpolicy - - os-config - - os-login - - phishingprotection - - policy-troubleshooter - - private-catalog - - profiler - - pubsublite - - recaptchaenterprise - - recommendations-ai - - recommender - - redis - - resource-settings - - resourcemanager - - retail - - scheduler - - secretmanager - - security-private-ca - - securitycenter - - securitycenter-settings - - service-control - - service-management - - service-usage - - servicedirectory - - shell - - spanner - - spanner-jdbc - - speech - - storage - - storage-nio - - storage-transfer - - talent - - tasks - - texttospeech - - tpu - - trace - - translate - - video-intelligence - - video-transcoder - - vision - - vpcaccess - - webrisk - - websecurityscanner - - workflow-executions - - workflows +# - accesscontextmanager +# - aiplatform +# - analytics-admin +# - analytics-data +# - api-gateway +# - apigee-connect +# - appengine-admin +# - area120-tables +# - artifact-registry +# - asset +# - assured-workloads +# - automl +# - bigquery +# - bigqueryconnection +# - bigquerydatatransfer +# - bigquerymigration +# - bigqueryreservation +# - bigtable +# - billing +# - billingbudgets +# - binary-authorization +# - channel +# - cloudbuild +# - compute +# - contact-center-insights +# - container +# - containeranalysis +# - data-fusion +# - datacatalog +# - dataflow +# - datalabeling +# - dataproc +# - dataproc-metastore +# - datastore +# - datastream +# - debugger-client +# - deploy +# - dialogflow +# - dialogflow-cx +# - dlp +# - dms +# - dns +# - document-ai +# - domains +# - errorreporting +# - essential-contacts +# - eventarc +# - filestore +# - firestore +# - functions +# - game-servers +# - gke-connect-gateway +# - gkehub +# - gsuite-addons +# - iam-admin +# - iamcredentials +# - iot +# - kms +# - language +# - life-sciences +# - logging +# - logging-logback +# - managed-identities +# - mediatranslation +# - memcache +# - monitoring +# - monitoring-dashboards +# - network-management +# - network-security +# - networkconnectivity +# - notebooks +# - orchestration-airflow +# - orgpolicy +# - os-config +# - os-login +# - phishingprotection +# - policy-troubleshooter +# - private-catalog +# - profiler +# - pubsublite +# - recaptchaenterprise +# - recommendations-ai +# - recommender +# - redis +# - resource-settings +# - resourcemanager +# - retail +# - scheduler +# - secretmanager +# - security-private-ca +# - securitycenter +# - securitycenter-settings +# - service-control +# - service-management +# - service-usage +# - servicedirectory +# - shell +# - spanner +# - spanner-jdbc +# - speech +# - storage +# - storage-nio +# - storage-transfer +# - talent +# - tasks +# - texttospeech +# - tpu +# - trace +# - translate +# - video-intelligence +# - video-transcoder +# - vision +# - vpcaccess +# - webrisk +# - websecurityscanner +# - workflow-executions +# - workflows steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -138,4 +138,9 @@ jobs: java-version: ${{matrix.java}} - run: java -version - run: sudo apt-get install libxml2-utils - - run: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} \ No newline at end of file + - uses: nick-invision/retry@v2 + with: + timeout_seconds: 15 + max_attempts: 2 + retry_on: error + command: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} diff --git a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java index 8f8abb170c..e1431d1f66 100644 --- a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java +++ b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java @@ -19,6 +19,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; +import java.util.Random; import org.junit.Test; public class IdentityTest { @@ -153,6 +154,11 @@ public void testValueOfThreePart() { assertEquals("b:c", identity.getValue()); } + @Test + public void randomTest() { + int randomOfTwoInts = new Random().nextBoolean() ? 1 : 2; + assertEquals(randomOfTwoInts, 1); + } private void compareIdentities(Identity expected, Identity actual) { assertEquals(expected, actual); assertEquals(expected.getType(), actual.getType()); From 791677bd0b2aeadee3a0afbca18c7c7ed5ee4e3f Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Wed, 19 Jan 2022 16:49:29 -0500 Subject: [PATCH 11/24] chore: change timeout --- .github/workflows/downstream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 80cd2c4852..357e8fa1b8 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -140,7 +140,7 @@ jobs: - run: sudo apt-get install libxml2-utils - uses: nick-invision/retry@v2 with: - timeout_seconds: 15 + timeout_minutes: 10 max_attempts: 2 retry_on: error command: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} From 8e104ae0766d5623b7ba4d4fb15120c9ad724120 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Wed, 19 Jan 2022 17:24:19 -0500 Subject: [PATCH 12/24] chore: running retry test --- .github/workflows/downstream.yaml | 16 +-- .kokoro/downstream-client-library-check.sh | 130 +++++++++--------- .../java/com/google/cloud/IdentityTest.java | 1 + 3 files changed, 74 insertions(+), 73 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 357e8fa1b8..c5b0c72853 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -14,14 +14,14 @@ jobs: java: [17] repo: - accessapproval -# - accesscontextmanager -# - aiplatform -# - analytics-admin -# - analytics-data -# - api-gateway -# - apigee-connect -# - appengine-admin -# - area120-tables + - accesscontextmanager + - aiplatform + - analytics-admin + - analytics-data + - api-gateway + - apigee-connect + - appengine-admin + - area120-tables # - artifact-registry # - asset # - assured-workloads diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 2b4e605646..e199b8737d 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -26,68 +26,68 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) cd ${scriptDir}/.. # Make java core library artifacts available for 'mvn validate' at the bottom -mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q - -# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' -CORE_VERSION_POM=pom.xml -# Namespace (xmlns) prevents xmllint from specifying tag names in XPath -CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` - -if [ -z "${CORE_VERSION}" ]; then - echo "Version is not found in ${CORE_VERSION_POM}" - exit 1 -fi -echo "Version: ${CORE_VERSION}" - -# Round 1 -# Check this java core library against HEAD of java-shared dependencies - -git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 -pushd java-shared-dependencies/first-party-dependencies - -# replace version -xmllint --shell <(cat pom.xml) << EOF -setns x=http://maven.apache.org/POM/4.0.0 -cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] -cd ../x:version -set ${CORE_VERSION} -save pom.xml -EOF - -# run dependencies script -cd .. -mvn -Denforcer.skip=true clean install - -SHARED_DEPS_VERSION_POM=pom.xml -# Namespace (xmlns) prevents xmllint from specifying tag names in XPath -SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` - -if [ -z "${SHARED_DEPS_VERSION}" ]; then - echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" - exit 1 -fi - -# Round 2 - -# Check this BOM against java client libraries -git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 -pushd java-${CLIENT_LIBRARY} - -if [[ $CLIENT_LIBRARY == "bigtable" ]]; then - pushd google-cloud-bigtable-deps-bom -fi - -# replace version -xmllint --shell <(cat pom.xml) << EOF -setns x=http://maven.apache.org/POM/4.0.0 -cd .//x:artifactId[text()="google-cloud-shared-dependencies"] -cd ../x:version -set ${SHARED_DEPS_VERSION} -save pom.xml -EOF - -if [[ $CLIENT_LIBRARY == "bigtable" ]]; then - popd -fi - -mvn -Denforcer.skip=true clean install +mvn install -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q +# +## Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +#CORE_VERSION_POM=pom.xml +## Namespace (xmlns) prevents xmllint from specifying tag names in XPath +#CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` +# +#if [ -z "${CORE_VERSION}" ]; then +# echo "Version is not found in ${CORE_VERSION_POM}" +# exit 1 +#fi +#echo "Version: ${CORE_VERSION}" +# +## Round 1 +## Check this java core library against HEAD of java-shared dependencies +# +#git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +#pushd java-shared-dependencies/first-party-dependencies +# +## replace version +#xmllint --shell <(cat pom.xml) << EOF +#setns x=http://maven.apache.org/POM/4.0.0 +#cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +#cd ../x:version +#set ${CORE_VERSION} +#save pom.xml +#EOF +# +## run dependencies script +#cd .. +#mvn -Denforcer.skip=true clean install +# +#SHARED_DEPS_VERSION_POM=pom.xml +## Namespace (xmlns) prevents xmllint from specifying tag names in XPath +#SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` +# +#if [ -z "${SHARED_DEPS_VERSION}" ]; then +# echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" +# exit 1 +#fi +# +## Round 2 +# +## Check this BOM against java client libraries +#git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +#pushd java-${CLIENT_LIBRARY} +# +#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then +# pushd google-cloud-bigtable-deps-bom +#fi +# +## replace version +#xmllint --shell <(cat pom.xml) << EOF +#setns x=http://maven.apache.org/POM/4.0.0 +#cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +#cd ../x:version +#set ${SHARED_DEPS_VERSION} +#save pom.xml +#EOF +# +#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then +# popd +#fi +# +#mvn -Denforcer.skip=true clean install diff --git a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java index e1431d1f66..75053f7e6e 100644 --- a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java +++ b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java @@ -157,6 +157,7 @@ public void testValueOfThreePart() { @Test public void randomTest() { int randomOfTwoInts = new Random().nextBoolean() ? 1 : 2; + System.out.println("************** " +randomOfTwoInts+" ************** " ); assertEquals(randomOfTwoInts, 1); } private void compareIdentities(Identity expected, Identity actual) { From 600272aac5ce93f985dcab727a7c3671b342809a Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 20 Jan 2022 13:01:52 -0500 Subject: [PATCH 13/24] chore: add retry option --- .github/workflows/downstream.yaml | 220 ++++++++++----------- .kokoro/downstream-client-library-check.sh | 130 ++++++------ 2 files changed, 175 insertions(+), 175 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index c5b0c72853..a721c0a4c1 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -22,115 +22,115 @@ jobs: - apigee-connect - appengine-admin - area120-tables -# - artifact-registry -# - asset -# - assured-workloads -# - automl -# - bigquery -# - bigqueryconnection -# - bigquerydatatransfer -# - bigquerymigration -# - bigqueryreservation -# - bigtable -# - billing -# - billingbudgets -# - binary-authorization -# - channel -# - cloudbuild -# - compute -# - contact-center-insights -# - container -# - containeranalysis -# - data-fusion -# - datacatalog -# - dataflow -# - datalabeling -# - dataproc -# - dataproc-metastore -# - datastore -# - datastream -# - debugger-client -# - deploy -# - dialogflow -# - dialogflow-cx -# - dlp -# - dms -# - dns -# - document-ai -# - domains -# - errorreporting -# - essential-contacts -# - eventarc -# - filestore -# - firestore -# - functions -# - game-servers -# - gke-connect-gateway -# - gkehub -# - gsuite-addons -# - iam-admin -# - iamcredentials -# - iot -# - kms -# - language -# - life-sciences -# - logging -# - logging-logback -# - managed-identities -# - mediatranslation -# - memcache -# - monitoring -# - monitoring-dashboards -# - network-management -# - network-security -# - networkconnectivity -# - notebooks -# - orchestration-airflow -# - orgpolicy -# - os-config -# - os-login -# - phishingprotection -# - policy-troubleshooter -# - private-catalog -# - profiler -# - pubsublite -# - recaptchaenterprise -# - recommendations-ai -# - recommender -# - redis -# - resource-settings -# - resourcemanager -# - retail -# - scheduler -# - secretmanager -# - security-private-ca -# - securitycenter -# - securitycenter-settings -# - service-control -# - service-management -# - service-usage -# - servicedirectory -# - shell -# - spanner -# - spanner-jdbc -# - speech -# - storage -# - storage-nio -# - storage-transfer -# - talent -# - tasks -# - texttospeech -# - tpu -# - trace -# - translate -# - video-intelligence -# - video-transcoder -# - vision -# - vpcaccess -# - webrisk -# - websecurityscanner -# - workflow-executions -# - workflows + - artifact-registry + - asset + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigtable + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsublite + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -141,6 +141,6 @@ jobs: - uses: nick-invision/retry@v2 with: timeout_minutes: 10 - max_attempts: 2 + max_attempts: 3 retry_on: error command: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index e199b8737d..2b4e605646 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -26,68 +26,68 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) cd ${scriptDir}/.. # Make java core library artifacts available for 'mvn validate' at the bottom -mvn install -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q -# -## Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' -#CORE_VERSION_POM=pom.xml -## Namespace (xmlns) prevents xmllint from specifying tag names in XPath -#CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` -# -#if [ -z "${CORE_VERSION}" ]; then -# echo "Version is not found in ${CORE_VERSION_POM}" -# exit 1 -#fi -#echo "Version: ${CORE_VERSION}" -# -## Round 1 -## Check this java core library against HEAD of java-shared dependencies -# -#git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 -#pushd java-shared-dependencies/first-party-dependencies -# -## replace version -#xmllint --shell <(cat pom.xml) << EOF -#setns x=http://maven.apache.org/POM/4.0.0 -#cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] -#cd ../x:version -#set ${CORE_VERSION} -#save pom.xml -#EOF -# -## run dependencies script -#cd .. -#mvn -Denforcer.skip=true clean install -# -#SHARED_DEPS_VERSION_POM=pom.xml -## Namespace (xmlns) prevents xmllint from specifying tag names in XPath -#SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` -# -#if [ -z "${SHARED_DEPS_VERSION}" ]; then -# echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" -# exit 1 -#fi -# -## Round 2 -# -## Check this BOM against java client libraries -#git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 -#pushd java-${CLIENT_LIBRARY} -# -#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then -# pushd google-cloud-bigtable-deps-bom -#fi -# -## replace version -#xmllint --shell <(cat pom.xml) << EOF -#setns x=http://maven.apache.org/POM/4.0.0 -#cd .//x:artifactId[text()="google-cloud-shared-dependencies"] -#cd ../x:version -#set ${SHARED_DEPS_VERSION} -#save pom.xml -#EOF -# -#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then -# popd -#fi -# -#mvn -Denforcer.skip=true clean install +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q + +# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +CORE_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` + +if [ -z "${CORE_VERSION}" ]; then + echo "Version is not found in ${CORE_VERSION_POM}" + exit 1 +fi +echo "Version: ${CORE_VERSION}" + +# Round 1 +# Check this java core library against HEAD of java-shared dependencies + +git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +pushd java-shared-dependencies/first-party-dependencies + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +cd ../x:version +set ${CORE_VERSION} +save pom.xml +EOF + +# run dependencies script +cd .. +mvn -Denforcer.skip=true clean install + +SHARED_DEPS_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` + +if [ -z "${SHARED_DEPS_VERSION}" ]; then + echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" + exit 1 +fi + +# Round 2 + +# Check this BOM against java client libraries +git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +pushd java-${CLIENT_LIBRARY} + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + pushd google-cloud-bigtable-deps-bom +fi + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +cd ../x:version +set ${SHARED_DEPS_VERSION} +save pom.xml +EOF + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + popd +fi + +mvn -Denforcer.skip=true clean install From 73a204005881bde858d1b5a1b2486199c41a2946 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 20 Jan 2022 13:04:31 -0500 Subject: [PATCH 14/24] chore: remove random test --- .../src/test/java/com/google/cloud/IdentityTest.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java index 75053f7e6e..adc32f7488 100644 --- a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java +++ b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java @@ -154,12 +154,6 @@ public void testValueOfThreePart() { assertEquals("b:c", identity.getValue()); } - @Test - public void randomTest() { - int randomOfTwoInts = new Random().nextBoolean() ? 1 : 2; - System.out.println("************** " +randomOfTwoInts+" ************** " ); - assertEquals(randomOfTwoInts, 1); - } private void compareIdentities(Identity expected, Identity actual) { assertEquals(expected, actual); assertEquals(expected.getType(), actual.getType()); From 911bee628ff3a78e7ef77e3a60448cb10544b0dc Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 20 Jan 2022 14:19:10 -0500 Subject: [PATCH 15/24] chore: formating --- .kokoro/downstream-client-library-check.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 2b4e605646..1d673c6635 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -17,7 +17,6 @@ set -eo pipefail # Display commands being run. set -x - CORE_LIBRARY_ARTIFACT=$1 CLIENT_LIBRARY=$2 ## Get the directory of the build script @@ -28,10 +27,8 @@ cd ${scriptDir}/.. # Make java core library artifacts available for 'mvn validate' at the bottom mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q -# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' -CORE_VERSION_POM=pom.xml # Namespace (xmlns) prevents xmllint from specifying tag names in XPath -CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -` +CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` if [ -z "${CORE_VERSION}" ]; then echo "Version is not found in ${CORE_VERSION_POM}" @@ -46,7 +43,7 @@ git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 pushd java-shared-dependencies/first-party-dependencies # replace version -xmllint --shell <(cat pom.xml) << EOF +xmllint --shell pom.xml << EOF setns x=http://maven.apache.org/POM/4.0.0 cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] cd ../x:version @@ -58,9 +55,8 @@ EOF cd .. mvn -Denforcer.skip=true clean install -SHARED_DEPS_VERSION_POM=pom.xml # Namespace (xmlns) prevents xmllint from specifying tag names in XPath -SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -` +SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` if [ -z "${SHARED_DEPS_VERSION}" ]; then echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" @@ -78,7 +74,7 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then fi # replace version -xmllint --shell <(cat pom.xml) << EOF +xmllint --shell pom.xml << EOF setns x=http://maven.apache.org/POM/4.0.0 cd .//x:artifactId[text()="google-cloud-shared-dependencies"] cd ../x:version From c2f52ba8cb7c00ae35ae8aa8a13b5a102459fa57 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 12:42:48 -0500 Subject: [PATCH 16/24] chore: display .m2 content --- .github/workflows/downstream.yaml | 214 ++++++++++----------- .kokoro/downstream-client-library-check.sh | 135 +++++++------ 2 files changed, 178 insertions(+), 171 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index a721c0a4c1..7114ba8787 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -24,113 +24,113 @@ jobs: - area120-tables - artifact-registry - asset - - assured-workloads - - automl - - bigquery - - bigqueryconnection - - bigquerydatatransfer - - bigquerymigration - - bigqueryreservation - - bigtable - - billing - - billingbudgets - - binary-authorization - - channel - - cloudbuild - - compute - - contact-center-insights - - container - - containeranalysis - - data-fusion - - datacatalog - - dataflow - - datalabeling - - dataproc - - dataproc-metastore - - datastore - - datastream - - debugger-client - - deploy - - dialogflow - - dialogflow-cx - - dlp - - dms - - dns - - document-ai - - domains - - errorreporting - - essential-contacts - - eventarc - - filestore - - firestore - - functions - - game-servers - - gke-connect-gateway - - gkehub - - gsuite-addons - - iam-admin - - iamcredentials - - iot - - kms - - language - - life-sciences - - logging - - logging-logback - - managed-identities - - mediatranslation - - memcache - - monitoring - - monitoring-dashboards - - network-management - - network-security - - networkconnectivity - - notebooks - - orchestration-airflow - - orgpolicy - - os-config - - os-login - - phishingprotection - - policy-troubleshooter - - private-catalog - - profiler - - pubsublite - - recaptchaenterprise - - recommendations-ai - - recommender - - redis - - resource-settings - - resourcemanager - - retail - - scheduler - - secretmanager - - security-private-ca - - securitycenter - - securitycenter-settings - - service-control - - service-management - - service-usage - - servicedirectory - - shell - - spanner - - spanner-jdbc - - speech - - storage - - storage-nio - - storage-transfer - - talent - - tasks - - texttospeech - - tpu - - trace - - translate - - video-intelligence - - video-transcoder - - vision - - vpcaccess - - webrisk - - websecurityscanner - - workflow-executions - - workflows +# - assured-workloads +# - automl +# - bigquery +# - bigqueryconnection +# - bigquerydatatransfer +# - bigquerymigration +# - bigqueryreservation +# - bigtable +# - billing +# - billingbudgets +# - binary-authorization +# - channel +# - cloudbuild +# - compute +# - contact-center-insights +# - container +# - containeranalysis +# - data-fusion +# - datacatalog +# - dataflow +# - datalabeling +# - dataproc +# - dataproc-metastore +# - datastore +# - datastream +# - debugger-client +# - deploy +# - dialogflow +# - dialogflow-cx +# - dlp +# - dms +# - dns +# - document-ai +# - domains +# - errorreporting +# - essential-contacts +# - eventarc +# - filestore +# - firestore +# - functions +# - game-servers +# - gke-connect-gateway +# - gkehub +# - gsuite-addons +# - iam-admin +# - iamcredentials +# - iot +# - kms +# - language +# - life-sciences +# - logging +# - logging-logback +# - managed-identities +# - mediatranslation +# - memcache +# - monitoring +# - monitoring-dashboards +# - network-management +# - network-security +# - networkconnectivity +# - notebooks +# - orchestration-airflow +# - orgpolicy +# - os-config +# - os-login +# - phishingprotection +# - policy-troubleshooter +# - private-catalog +# - profiler +# - pubsublite +# - recaptchaenterprise +# - recommendations-ai +# - recommender +# - redis +# - resource-settings +# - resourcemanager +# - retail +# - scheduler +# - secretmanager +# - security-private-ca +# - securitycenter +# - securitycenter-settings +# - service-control +# - service-management +# - service-usage +# - servicedirectory +# - shell +# - spanner +# - spanner-jdbc +# - speech +# - storage +# - storage-nio +# - storage-transfer +# - talent +# - tasks +# - texttospeech +# - tpu +# - trace +# - translate +# - video-intelligence +# - video-transcoder +# - vision +# - vpcaccess +# - webrisk +# - websecurityscanner +# - workflow-executions +# - workflows steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 1d673c6635..7dc10a2c29 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -22,68 +22,75 @@ CLIENT_LIBRARY=$2 ## 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}/.. -# Make java core library artifacts available for 'mvn validate' at the bottom -mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q - -# Namespace (xmlns) prevents xmllint from specifying tag names in XPath -CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` - -if [ -z "${CORE_VERSION}" ]; then - echo "Version is not found in ${CORE_VERSION_POM}" - exit 1 -fi -echo "Version: ${CORE_VERSION}" - -# Round 1 -# Check this java core library against HEAD of java-shared dependencies - -git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 -pushd java-shared-dependencies/first-party-dependencies - -# replace version -xmllint --shell pom.xml << EOF -setns x=http://maven.apache.org/POM/4.0.0 -cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] -cd ../x:version -set ${CORE_VERSION} -save pom.xml -EOF - -# run dependencies script -cd .. -mvn -Denforcer.skip=true clean install - -# Namespace (xmlns) prevents xmllint from specifying tag names in XPath -SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` - -if [ -z "${SHARED_DEPS_VERSION}" ]; then - echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" - exit 1 -fi - -# Round 2 - -# Check this BOM against java client libraries -git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 -pushd java-${CLIENT_LIBRARY} - -if [[ $CLIENT_LIBRARY == "bigtable" ]]; then - pushd google-cloud-bigtable-deps-bom -fi - -# replace version -xmllint --shell pom.xml << EOF -setns x=http://maven.apache.org/POM/4.0.0 -cd .//x:artifactId[text()="google-cloud-shared-dependencies"] -cd ../x:version -set ${SHARED_DEPS_VERSION} -save pom.xml -EOF - -if [[ $CLIENT_LIBRARY == "bigtable" ]]; then - popd -fi - -mvn -Denforcer.skip=true clean install +# Clean up many maven cache +echo "###############CLOUD##################" +find $HOME/.m2/repository/com/google/cloud +echo "###############API##################" +find $HOME/.m2/repository/com/google/api +# +#cd ${scriptDir}/.. +# +## Make java core library artifacts available for 'mvn validate' at the bottom +#mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q +# +## Namespace (xmlns) prevents xmllint from specifying tag names in XPath +#CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` +# +#if [ -z "${CORE_VERSION}" ]; then +# echo "Version is not found in ${CORE_VERSION_POM}" +# exit 1 +#fi +#echo "Version: ${CORE_VERSION}" +# +## Round 1 +## Check this java core library against HEAD of java-shared dependencies +# +#git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +#pushd java-shared-dependencies/first-party-dependencies +# +## replace version +#xmllint --shell pom.xml << EOF +#setns x=http://maven.apache.org/POM/4.0.0 +#cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +#cd ../x:version +#set ${CORE_VERSION} +#save pom.xml +#EOF +# +## run dependencies script +#cd .. +#mvn -Denforcer.skip=true clean install +# +## Namespace (xmlns) prevents xmllint from specifying tag names in XPath +#SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` +# +#if [ -z "${SHARED_DEPS_VERSION}" ]; then +# echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" +# exit 1 +#fi +# +## Round 2 +# +## Check this BOM against java client libraries +#git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +#pushd java-${CLIENT_LIBRARY} +# +#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then +# pushd google-cloud-bigtable-deps-bom +#fi +# +## replace version +#xmllint --shell pom.xml << EOF +#setns x=http://maven.apache.org/POM/4.0.0 +#cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +#cd ../x:version +#set ${SHARED_DEPS_VERSION} +#save pom.xml +#EOF +# +#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then +# popd +#fi +# +#mvn -Denforcer.skip=true clean install From 79d91cb1784c51f7e6b5c4c4376c0f8569f28cb5 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 12:50:03 -0500 Subject: [PATCH 17/24] chore: remove retry --- .github/workflows/downstream.yaml | 221 ++++++++++----------- .kokoro/downstream-client-library-check.sh | 135 ++++++------- 2 files changed, 172 insertions(+), 184 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 7114ba8787..570850cb96 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -24,113 +24,113 @@ jobs: - area120-tables - artifact-registry - asset -# - assured-workloads -# - automl -# - bigquery -# - bigqueryconnection -# - bigquerydatatransfer -# - bigquerymigration -# - bigqueryreservation -# - bigtable -# - billing -# - billingbudgets -# - binary-authorization -# - channel -# - cloudbuild -# - compute -# - contact-center-insights -# - container -# - containeranalysis -# - data-fusion -# - datacatalog -# - dataflow -# - datalabeling -# - dataproc -# - dataproc-metastore -# - datastore -# - datastream -# - debugger-client -# - deploy -# - dialogflow -# - dialogflow-cx -# - dlp -# - dms -# - dns -# - document-ai -# - domains -# - errorreporting -# - essential-contacts -# - eventarc -# - filestore -# - firestore -# - functions -# - game-servers -# - gke-connect-gateway -# - gkehub -# - gsuite-addons -# - iam-admin -# - iamcredentials -# - iot -# - kms -# - language -# - life-sciences -# - logging -# - logging-logback -# - managed-identities -# - mediatranslation -# - memcache -# - monitoring -# - monitoring-dashboards -# - network-management -# - network-security -# - networkconnectivity -# - notebooks -# - orchestration-airflow -# - orgpolicy -# - os-config -# - os-login -# - phishingprotection -# - policy-troubleshooter -# - private-catalog -# - profiler -# - pubsublite -# - recaptchaenterprise -# - recommendations-ai -# - recommender -# - redis -# - resource-settings -# - resourcemanager -# - retail -# - scheduler -# - secretmanager -# - security-private-ca -# - securitycenter -# - securitycenter-settings -# - service-control -# - service-management -# - service-usage -# - servicedirectory -# - shell -# - spanner -# - spanner-jdbc -# - speech -# - storage -# - storage-nio -# - storage-transfer -# - talent -# - tasks -# - texttospeech -# - tpu -# - trace -# - translate -# - video-intelligence -# - video-transcoder -# - vision -# - vpcaccess -# - webrisk -# - websecurityscanner -# - workflow-executions -# - workflows + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigtable + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsublite + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -138,9 +138,4 @@ jobs: java-version: ${{matrix.java}} - run: java -version - run: sudo apt-get install libxml2-utils - - uses: nick-invision/retry@v2 - with: - timeout_minutes: 10 - max_attempts: 3 - retry_on: error - command: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} + - run: .kokoro/downstream-client-library-check.sh google-cloud-core-bom ${{matrix.repo}} diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 7dc10a2c29..1d673c6635 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -22,75 +22,68 @@ CLIENT_LIBRARY=$2 ## 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}/.. -# Clean up many maven cache -echo "###############CLOUD##################" -find $HOME/.m2/repository/com/google/cloud -echo "###############API##################" -find $HOME/.m2/repository/com/google/api -# -#cd ${scriptDir}/.. -# -## Make java core library artifacts available for 'mvn validate' at the bottom -#mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q -# -## Namespace (xmlns) prevents xmllint from specifying tag names in XPath -#CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` -# -#if [ -z "${CORE_VERSION}" ]; then -# echo "Version is not found in ${CORE_VERSION_POM}" -# exit 1 -#fi -#echo "Version: ${CORE_VERSION}" -# -## Round 1 -## Check this java core library against HEAD of java-shared dependencies -# -#git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 -#pushd java-shared-dependencies/first-party-dependencies -# -## replace version -#xmllint --shell pom.xml << EOF -#setns x=http://maven.apache.org/POM/4.0.0 -#cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] -#cd ../x:version -#set ${CORE_VERSION} -#save pom.xml -#EOF -# -## run dependencies script -#cd .. -#mvn -Denforcer.skip=true clean install -# -## Namespace (xmlns) prevents xmllint from specifying tag names in XPath -#SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` -# -#if [ -z "${SHARED_DEPS_VERSION}" ]; then -# echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" -# exit 1 -#fi -# -## Round 2 -# -## Check this BOM against java client libraries -#git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 -#pushd java-${CLIENT_LIBRARY} -# -#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then -# pushd google-cloud-bigtable-deps-bom -#fi -# -## replace version -#xmllint --shell pom.xml << EOF -#setns x=http://maven.apache.org/POM/4.0.0 -#cd .//x:artifactId[text()="google-cloud-shared-dependencies"] -#cd ../x:version -#set ${SHARED_DEPS_VERSION} -#save pom.xml -#EOF -# -#if [[ $CLIENT_LIBRARY == "bigtable" ]]; then -# popd -#fi -# -#mvn -Denforcer.skip=true clean install +# Make java core library artifacts available for 'mvn validate' at the bottom +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q + +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` + +if [ -z "${CORE_VERSION}" ]; then + echo "Version is not found in ${CORE_VERSION_POM}" + exit 1 +fi +echo "Version: ${CORE_VERSION}" + +# Round 1 +# Check this java core library against HEAD of java-shared dependencies + +git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +pushd java-shared-dependencies/first-party-dependencies + +# replace version +xmllint --shell pom.xml << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +cd ../x:version +set ${CORE_VERSION} +save pom.xml +EOF + +# run dependencies script +cd .. +mvn -Denforcer.skip=true clean install + +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` + +if [ -z "${SHARED_DEPS_VERSION}" ]; then + echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" + exit 1 +fi + +# Round 2 + +# Check this BOM against java client libraries +git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +pushd java-${CLIENT_LIBRARY} + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + pushd google-cloud-bigtable-deps-bom +fi + +# replace version +xmllint --shell pom.xml << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +cd ../x:version +set ${SHARED_DEPS_VERSION} +save pom.xml +EOF + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + popd +fi + +mvn -Denforcer.skip=true clean install From f137d9d47f06ba5602132e17a39677468a2d38e9 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 12:54:08 -0500 Subject: [PATCH 18/24] chore: revome random import --- .../src/test/java/com/google/cloud/IdentityTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java index adc32f7488..8f8abb170c 100644 --- a/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java +++ b/google-cloud-core/src/test/java/com/google/cloud/IdentityTest.java @@ -19,7 +19,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import java.util.Random; import org.junit.Test; public class IdentityTest { From e012d8bd6409312900f5a764e7e6a9477d64118d Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 13:42:02 -0500 Subject: [PATCH 19/24] chore: add license --- .github/workflows/downstream.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 570850cb96..00805b0e2e 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: types: [ labeled ] From dad1aec89249316e1d8c74ff250efa023f48a097 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 15:22:18 -0500 Subject: [PATCH 20/24] chore: add comments and flags --- .github/workflows/downstream.yaml | 1 + .kokoro/downstream-client-library-check.sh | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 00805b0e2e..a675b7ec74 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -28,6 +28,7 @@ jobs: matrix: java: [17] repo: + # This list needs to be updated manually until an automated solution is in place. - accessapproval - accesscontextmanager - aiplatform diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 1d673c6635..c25143d2bf 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -24,8 +24,12 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. -# Make java core library artifacts available for 'mvn validate' at the bottom -mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q +# Make java core library artifacts available for 'mvn install' at the bottom +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Namespace (xmlns) prevents xmllint from specifying tag names in XPath CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` @@ -53,7 +57,12 @@ EOF # run dependencies script cd .. -mvn -Denforcer.skip=true clean install +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -Denforcer.skip=true # Namespace (xmlns) prevents xmllint from specifying tag names in XPath SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` @@ -86,4 +95,9 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then popd fi -mvn -Denforcer.skip=true clean install +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -Denforcer.skip=true From 54201776d9f736c7099d48cd16894ad2224fa8ce Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 15:28:45 -0500 Subject: [PATCH 21/24] chore: add maven export --- .kokoro/downstream-client-library-check.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index c25143d2bf..9ca4132c16 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -24,9 +24,11 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +export MAVEN_OPTS=$(determineMavenOpts) + # Make java core library artifacts available for 'mvn install' at the bottom retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ + mvn install -B -V -ntp -fae \ -DskipTests=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true @@ -58,7 +60,7 @@ EOF # run dependencies script cd .. retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ + mvn install -B -V -ntp -fae\ -DskipTests=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ @@ -96,7 +98,7 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then fi retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ + mvn install -B -V -ntp -fae\ -DskipTests=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ From 07764b0184828c842ca5c41cc6d0860ef87b7da0 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 15:32:59 -0500 Subject: [PATCH 22/24] chore: remove retry with maven --- .kokoro/downstream-client-library-check.sh | 34 ++++++++++------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 9ca4132c16..dc22e80641 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -24,14 +24,11 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. -export MAVEN_OPTS=$(determineMavenOpts) - # Make java core library artifacts available for 'mvn install' at the bottom -retry_with_backoff 3 10 \ - mvn install -B -V -ntp -fae \ - -DskipTests=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +mvn install -B -V -ntp -fae \ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true # Namespace (xmlns) prevents xmllint from specifying tag names in XPath CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` @@ -59,12 +56,12 @@ EOF # run dependencies script cd .. -retry_with_backoff 3 10 \ - mvn install -B -V -ntp -fae\ - -DskipTests=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -Denforcer.skip=true + +mvn install -B -V -ntp -fae\ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true # Namespace (xmlns) prevents xmllint from specifying tag names in XPath SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -` @@ -97,9 +94,8 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then popd fi -retry_with_backoff 3 10 \ - mvn install -B -V -ntp -fae\ - -DskipTests=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -Denforcer.skip=true +mvn install -B -V -ntp -fae\ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true From ddbd9659695cf6c71304f9a87703ded3184d66da Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 25 Jan 2022 17:37:05 -0500 Subject: [PATCH 23/24] chore: run test on client libraries --- .kokoro/downstream-client-library-check.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index dc22e80641..55c2e8dd95 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -95,7 +95,6 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then fi mvn install -B -V -ntp -fae\ --DskipTests=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ -Denforcer.skip=true From ddb68ac429cde269e4521b0ebae35009b2b7aba0 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Wed, 26 Jan 2022 11:16:12 -0500 Subject: [PATCH 24/24] chore: fix typo --- .kokoro/downstream-client-library-check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index 55c2e8dd95..37fe6083bf 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -57,7 +57,7 @@ EOF # run dependencies script cd .. -mvn install -B -V -ntp -fae\ +mvn install -B -V -ntp -fae \ -DskipTests=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ @@ -94,7 +94,7 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then popd fi -mvn install -B -V -ntp -fae\ +mvn install -B -V -ntp -fae \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ -Denforcer.skip=true