Skip to content

Commit 76f55db

Browse files
Change triggered by none of the following:
This git repo (https://github.com/googleapis/java-logging.git) Git repo https://github.com/googleapis/googleapis.git
1 parent 22c7918 commit 76f55db

File tree

10 files changed

+235
-50
lines changed

10 files changed

+235
-50
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)
1+
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
2+
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-logging/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
3+
- [ ] Ensure the tests and linter pass
4+
- [ ] Code coverage does not decrease (if any source code was changed)
5+
- [ ] Appropriate docs were updated (if necessary)
6+
7+
Fixes #<issue_number_goes_here> ☕️

.kokoro/build.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
2020
## cd to the parent directory, i.e. the root of the git repo
2121
cd ${scriptDir}/..
2222

23+
# include common functions
24+
source ${scriptDir}/common.sh
25+
2326
# Print out Java version
2427
java -version
2528
echo ${JOB_TYPE}
2629

27-
mvn install -B -V \
28-
-DskipTests=true \
29-
-Dclirr.skip=true \
30-
-Denforcer.skip=true \
31-
-Dmaven.javadoc.skip=true \
32-
-Dgcloud.download.skip=true \
33-
-T 1C
30+
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
31+
retry_with_backoff 3 10 \
32+
mvn install -B -V \
33+
-DskipTests=true \
34+
-Dclirr.skip=true \
35+
-Denforcer.skip=true \
36+
-Dmaven.javadoc.skip=true \
37+
-Dgcloud.download.skip=true \
38+
-T 1C
3439

3540
# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
3641
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then

.kokoro/common.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
function retry_with_backoff {
17+
attempts_left=$1
18+
sleep_seconds=$2
19+
shift 2
20+
command=$@
21+
22+
23+
# store current flag state
24+
flags=$-
25+
26+
# allow a failures to continue
27+
set +e
28+
echo "${command}"
29+
${command}
30+
exit_code=$?
31+
32+
# restore "e" flag
33+
if [[ ${flags} =~ e ]]
34+
then set -e
35+
else set +e
36+
fi
37+
38+
if [[ $exit_code == 0 ]]
39+
then
40+
return 0
41+
fi
42+
43+
# failure
44+
if [[ ${attempts_left} > 0 ]]
45+
then
46+
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
47+
sleep ${sleep_seconds}
48+
new_attempts=$((${attempts_left} - 1))
49+
new_sleep=$((${sleep_seconds} * 2))
50+
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
51+
fi
52+
53+
return $exit_code
54+
}

.kokoro/dependencies.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515

1616
set -eo pipefail
1717

18-
cd github/java-logging/
18+
## Get the directory of the build script
19+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
20+
## cd to the parent directory, i.e. the root of the git repo
21+
cd ${scriptDir}/..
22+
23+
# include common functions
24+
source ${scriptDir}/common.sh
1925

2026
# Print out Java
2127
java -version
@@ -24,8 +30,9 @@ echo $JOB_TYPE
2430
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
2531

2632
# this should run maven enforcer
27-
mvn install -B -V \
28-
-DskipTests=true \
29-
-Dclirr.skip=true
33+
retry_with_backoff 3 10 \
34+
mvn install -B -V \
35+
-DskipTests=true \
36+
-Dclirr.skip=true
3037

3138
mvn -B dependency:analyze -DfailOnWarning=true

.kokoro/linkage-monitor.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,26 @@ set -eo pipefail
1717
# Display commands being run.
1818
set -x
1919

20-
cd github/java-logging/
20+
## Get the directory of the build script
21+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
22+
## cd to the parent directory, i.e. the root of the git repo
23+
cd ${scriptDir}/..
24+
25+
# include common functions
26+
source ${scriptDir}/common.sh
2127

2228
# Print out Java version
2329
java -version
2430
echo ${JOB_TYPE}
2531

26-
mvn install -B -V \
27-
-DskipTests=true \
28-
-Dclirr.skip=true \
29-
-Denforcer.skip=true \
30-
-Dmaven.javadoc.skip=true \
31-
-Dgcloud.download.skip=true
32+
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
33+
retry_with_backoff 3 10 \
34+
mvn install -B -V \
35+
-DskipTests=true \
36+
-Dclirr.skip=true \
37+
-Denforcer.skip=true \
38+
-Dmaven.javadoc.skip=true \
39+
-Dgcloud.download.skip=true
3240

3341
# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR
3442
JAR=linkage-monitor-latest-all-deps.jar

.kokoro/nightly/integration.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@ env_vars: {
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
88

9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "integration"
12+
}
13+
14+
env_vars: {
15+
key: "GCLOUD_PROJECT"
16+
value: "gcloud-devel"
17+
}
18+
919
env_vars: {
1020
key: "ENABLE_BUILD_COP"
1121
value: "true"
1222
}
1323

24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "keystore/73713_java_it_service_account"
27+
}
28+
1429
before_action {
1530
fetch_keystore {
1631
keystore_resource {

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,40 @@ Java idiomatic client for [Stackdriver Logging][product-docs].
1212

1313
If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
1414
```xml
15-
<dependencyManagement>
16-
<dependencies>
17-
<dependency>
18-
<groupId>com.google.cloud</groupId>
19-
<artifactId>libraries-bom</artifactId>
20-
<version>4.1.1</version>
21-
<type>pom</type>
22-
<scope>import</scope>
23-
</dependency>
24-
</dependencies>
25-
</dependencyManagement>
26-
15+
<dependencyManagement>
2716
<dependencies>
2817
<dependency>
2918
<groupId>com.google.cloud</groupId>
30-
<artifactId>google-cloud-logging</artifactId>
19+
<artifactId>libraries-bom</artifactId>
20+
<version>4.1.1</version>
21+
<type>pom</type>
22+
<scope>import</scope>
3123
</dependency>
3224
</dependencies>
25+
</dependencyManagement>
3326

34-
```
27+
<dependencies>
28+
<dependency>
29+
<groupId>com.google.cloud</groupId>
30+
<artifactId>google-cloud-logging</artifactId>
31+
</dependency>
32+
</dependencies>
3533

36-
[//]: # ({x-version-update-start:google-cloud-logging:released})
34+
```
3735

3836
If you are using Maven without BOM, add this to your dependencies:
3937

4038
```xml
41-
<dependency>
42-
<groupId>com.google.cloud</groupId>
43-
<artifactId>google-cloud-logging</artifactId>
44-
<version>1.101.1</version>
45-
</dependency>
39+
<dependency>
40+
<groupId>com.google.cloud</groupId>
41+
<artifactId>google-cloud-logging</artifactId>
42+
<version>1.100.0</version>
43+
</dependency>
4644

4745
```
4846

47+
[//]: # ({x-version-update-start:google-cloud-logging:released})
48+
4949
If you are using Gradle, add this to your dependencies
5050
```Groovy
5151
compile 'com.google.cloud:google-cloud-logging:1.101.1'

renovate.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
},
5757
{
5858
"packagePatterns": [
59-
"^com.google.cloud:libraries-bom"
59+
"^com.google.cloud:google-cloud-logging",
60+
"^com.google.cloud:libraries-bom",
61+
"^com.google.cloud.samples:shared-configuration"
6062
],
6163
"semanticCommitType": "chore",
6264
"semanticCommitScope": "deps"
@@ -75,4 +77,4 @@
7577
}
7678
],
7779
"semanticCommits": true
78-
}
80+
}

samples/snapshot/pom.xml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.google.cloud</groupId>
5+
<artifactId>logging-snapshot</artifactId>
6+
<packaging>jar</packaging>
7+
<name>Google Stackdriver Logging Snapshot Samples</name>
8+
<url>https://github.com/googleapis/java-logging</url>
9+
10+
<!--
11+
The parent pom defines common style checks and testing strategies for our samples.
12+
Removing or replacing it should not affect the execution of the samples in anyway.
13+
-->
14+
<parent>
15+
<groupId>com.google.cloud.samples</groupId>
16+
<artifactId>shared-configuration</artifactId>
17+
<version>1.0.12</version>
18+
</parent>
19+
20+
<properties>
21+
<maven.compiler.target>1.8</maven.compiler.target>
22+
<maven.compiler.source>1.8</maven.compiler.source>
23+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24+
</properties>
25+
26+
<!-- {x-version-update-start::current} -->
27+
<dependencies>
28+
<dependency>
29+
<groupId>com.google.cloud</groupId>
30+
<artifactId>google-cloud-logging</artifactId>
31+
<version>1.101.1</version>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>junit</groupId>
36+
<artifactId>junit</artifactId>
37+
<version>4.13</version>
38+
<scope>test</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>com.google.truth</groupId>
42+
<artifactId>truth</artifactId>
43+
<version>1.0.1</version>
44+
<scope>test</scope>
45+
</dependency>
46+
</dependencies>
47+
<!-- {x-version-update-end} -->
48+
49+
<!-- compile and run all snippet tests -->
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.codehaus.mojo</groupId>
54+
<artifactId>build-helper-maven-plugin</artifactId>
55+
<version>3.1.0</version>
56+
<executions>
57+
<execution>
58+
<id>add-snippets-source</id>
59+
<goals>
60+
<goal>add-source</goal>
61+
</goals>
62+
<configuration>
63+
<sources>
64+
<source>../snippets/src/main/java</source>
65+
</sources>
66+
</configuration>
67+
</execution>
68+
<execution>
69+
<id>add-snippets-tests</id>
70+
<goals>
71+
<goal>add-test-source</goal>
72+
</goals>
73+
<configuration>
74+
<sources>
75+
<source>../snippets/src/test/java</source>
76+
</sources>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
</project>

synth.metadata

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
2-
"updateTime": "2020-02-29T09:42:45.087168Z",
32
"sources": [
43
{
54
"generator": {
65
"name": "artman",
7-
"version": "0.47.0",
8-
"dockerImage": "googleapis/artman@sha256:b3e50d6b8de03920b9f065bbc3d210e2ca93a043446f1fa16cdf567393c09678"
6+
"version": "1.2.0",
7+
"dockerImage": "googleapis/artman@sha256:ef1a5b367dbe1e37cea1c7c814c801a638473e8dd66f87f4a2b8c2a146013673"
8+
}
9+
},
10+
{
11+
"git": {
12+
"name": ".",
13+
"remote": "https://github.com/googleapis/java-logging.git",
14+
"sha": "4ca5895f2bb83fcf1c7ecf908aae1c50d9cd89d9"
915
}
1016
},
1117
{
1218
"git": {
1319
"name": "googleapis",
1420
"remote": "https://github.com/googleapis/googleapis.git",
1521
"sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080",
16-
"internalRef": "297918498",
17-
"log": "83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\n"
22+
"internalRef": "297918498"
1823
}
1924
},
2025
{
21-
"template": {
22-
"name": "java_library",
23-
"origin": "synthtool.gcp",
24-
"version": "2020.2.4"
26+
"git": {
27+
"name": "synthtool",
28+
"remote": "https://github.com/googleapis/synthtool.git",
29+
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5"
2530
}
2631
}
2732
],

0 commit comments

Comments
 (0)