From b5dce9e9ff8b672778754ac07789c44275facbae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 1 Apr 2020 14:01:51 -0700 Subject: [PATCH] chore: update common templates (#216) * Change triggered by none of the following: This git repo (https://github.com/googleapis/java-storage.git) * docs: clarify documentation on date formats (#196) https://github.com/googleapis/java-storage/commit/9b4af5870ef38cae4e92b60a2f8e6efd3e93d06d commit 9b4af5870ef38cae4e92b60a2f8e6efd3e93d06d Author: johnalowry Date: Wed Mar 18 17:01:52 2020 -0700 docs: clarify documentation on date formats (#196) System.out.printf("Blob updatetime: %s", blob.getUpdateTime()); The output was Blob updatetime: 1582157090238 I verified that this was ms after epoch: $ date -d @1582157090 Wed 19 Feb 2020 04:04:50 PM PST I also traced the code to this function: https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/main/java/com/google/api/client/util/DateTime.java#L53 I assumed that create and delete times used the same format. * chore: use java helper for templates (#195) https://github.com/googleapis/java-storage/commit/b0ffd0b9c41123b096d32a3e4fdd1210d6279e2a commit b0ffd0b9c41123b096d32a3e4fdd1210d6279e2a Author: Jeff Ching Date: Wed Mar 18 17:04:08 2020 -0700 chore: use java helper for templates (#195) We are cleaning up usage of common templates in synthtool. This allows us the cleanup usage in a centralized place rather than in 60+ repos * deps: update dependency org.threeten:threetenbp to v1.4.2 (#200) https://github.com/googleapis/java-storage/commit/84faad1a854c3a189d2997a121a8753988213f90 commit 84faad1a854c3a189d2997a121a8753988213f90 Author: WhiteSource Renovate Date: Sat Mar 21 03:39:53 2020 +0100 deps: update dependency org.threeten:threetenbp to v1.4.2 (#200) * deps: update dependency com.google.api:api-common to v1.9.0 (#209) https://github.com/googleapis/java-storage/commit/789ceaa2be6163f85f483637205191e38029e0c2 commit 789ceaa2be6163f85f483637205191e38029e0c2 Author: WhiteSource Renovate Date: Thu Mar 26 00:22:02 2020 +0100 deps: update dependency com.google.api:api-common to v1.9.0 (#209) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.api:api-common](https://togithub.com/googleapis/api-common-java) | minor | `1.8.1` -> `1.9.0` | --- ### Release Notes
googleapis/api-common-java ### [`v1.9.0`](https://togithub.com/googleapis/api-common-java/releases/v1.9.0) [Compare Source](https://togithub.com/googleapis/api-common-java/compare/v1.8.1...v1.9.0) 03-25-2020 14:09 PST #### New Features - Add `@BetaApi` `ApiFutres.catchingAsync()` ([#​117](https://togithub.com/googleapis/api-common-java/pull/117)) ##### Dependencies - Update guava to v28.2-android ([#​110](https://togithub.com/googleapis/api-common-java/pull/110)) - Update error_prone_annotations to v2.2.3 ([#​111](https://togithub.com/googleapis/api-common-java/pull/111))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-storage). * samples: fix install-without-bom version (#211) https://github.com/googleapis/java-storage/commit/08750dbc3e4a2c6ef39f4bd0711c85192885b1ed commit 08750dbc3e4a2c6ef39f4bd0711c85192885b1ed Author: Jeff Ching Date: Fri Mar 27 15:09:06 2020 -0700 samples: fix install-without-bom version (#211) * samples: fix install-without-bom version * samples: fix snapshot version * samples: fix libraries-bom version * fix: storage-client-lib-docs to right location (#213) https://github.com/googleapis/java-storage/commit/133d1377781fd6bdc58dd4f494a75ec1d7b9e530 commit 133d1377781fd6bdc58dd4f494a75ec1d7b9e530 Author: Frank Natividad Date: Fri Mar 27 15:44:02 2020 -0700 fix: storage-client-lib-docs to right location (#213) * deps: update conformance test dep (#210) https://github.com/googleapis/java-storage/commit/010c1128761d9c74ba1af33bc34e9264f34b8c80 commit 010c1128761d9c74ba1af33bc34e9264f34b8c80 Author: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Fri Mar 27 15:59:00 2020 -0700 deps: update conformance test dep (#210) * Update conformance test dep * Update conformance test dep * chore: fix synth.py error and enable multiple autosynth commits (#215) https://github.com/googleapis/java-storage/commit/2faeb543c87d0a83a87ee0953159f0be805ad012 commit 2faeb543c87d0a83a87ee0953159f0be805ad012 Author: Jeff Ching Date: Mon Mar 30 09:56:42 2020 -0700 chore: fix synth.py error and enable multiple autosynth commits (#215) * deps: update dependency com.google.cloud.samples:shared-configuration to v1.0.14 (#207) https://github.com/googleapis/java-storage/commit/be74072662f2e3a99e54ee3d3feff66cb39032b2 commit be74072662f2e3a99e54ee3d3feff66cb39032b2 Author: WhiteSource Renovate Date: Mon Mar 30 22:25:27 2020 +0200 deps: update dependency com.google.cloud.samples:shared-configuration to v1.0.14 (#207) --- .kokoro/build.sh | 19 ++++++++++------ .kokoro/common.sh | 44 ++++++++++++++++++++++++++++++++++++++ .kokoro/dependencies.sh | 15 +++++++++---- .kokoro/linkage-monitor.sh | 22 +++++++++++++------ renovate.json | 6 ++++-- synth.metadata | 10 ++++----- 6 files changed, 91 insertions(+), 25 deletions(-) create mode 100644 .kokoro/common.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f833a0621..86bb6be34 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +# include common functions +source ${scriptDir}/common.sh + # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 000000000..a3bbc5f67 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/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. + +# set -eo pipefail + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 04a288b1a..0aade871c 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -15,7 +15,13 @@ set -eo pipefail -cd github/java-storage/ +## 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}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java java -version @@ -24,8 +30,9 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index 158641cbe..759ab4e2c 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,18 +17,26 @@ set -eo pipefail # Display commands being run. set -x -cd github/java-storage/ +## 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}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar diff --git a/renovate.json b/renovate.json index fc6412701..1dcdf893f 100644 --- a/renovate.json +++ b/renovate.json @@ -56,7 +56,9 @@ }, { "packagePatterns": [ - "^com.google.cloud:libraries-bom" + "^com.google.cloud:google-cloud-storage", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" ], "semanticCommitType": "chore", "semanticCommitScope": "deps" @@ -75,4 +77,4 @@ } ], "semanticCommits": true -} +} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 66cd387f8..1a8f7a393 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,11 +1,11 @@ { - "updateTime": "2020-03-17T18:53:43.239577Z", + "updateTime": "2020-03-30T22:54:24.805818Z", "sources": [ { - "template": { - "name": "java_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "a003d8655d3ebec2bbbd5fc3898e91e152265c67" } } ]