Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 4ca2995

Browse files
authored
Merge branch 'master' into renovate/com.google.auto.value-auto-value-annotations-1.x
2 parents bf02881 + 0886a52 commit 4ca2995

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1035
-116
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Code owners file.
22
# This file controls who is tagged for review for any given pull request.
3-
#
3+
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

77
* @googleapis/actools-java @googleapis/yoshi-java
8+
9+
# The java-samples-reviewers team is the default owner for samples changes
10+
samples/**/*.java @googleapis/java-samples-reviewers

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
Please run down the following list and make sure you've tried the usual "quick fixes":
12+
13+
- Search the issues already opened: https://github.com/googleapis/api-common-java/issues
14+
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform
15+
16+
If you are still having issues, please include as much information as possible:
17+
18+
#### Environment details
19+
20+
1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
21+
General, Core, and Other are also allowed as types
22+
2. OS type and version:
23+
3. Java version:
24+
4. api-common-java version(s):
25+
26+
#### Steps to reproduce
27+
28+
1. ?
29+
2. ?
30+
31+
#### Code example
32+
33+
```java
34+
// example
35+
```
36+
37+
#### Stack trace
38+
```
39+
Any relevant stacktrace here.
40+
```
41+
42+
#### External references such as API reference guides
43+
44+
- ?
45+
46+
#### Any additional information below
47+
48+
49+
Following these steps guarantees the quickest resolution possible.
50+
51+
Thanks!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this library
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
What the problem is. Example: I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
What you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
Any alternative solutions or features you've considered.
19+
20+
**Additional context**
21+
Any other context or screenshots about the feature request.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Support request
3+
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.
4+
5+
---
6+
7+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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/api-common-java/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> ☕️

.github/blunderbuss.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration for the Blunderbuss GitHub app. For more info see
2+
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
3+
assign_prs_by:
4+
- labels:
5+
- samples
6+
to:
7+
- googleapis/java-samples-reviewers

.github/generated-files-bot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
externalManifests:
2+
- type: json
3+
file: 'synth.metadata'
4+
jsonpath: '$.generatedFiles[*]'
5+
- type: json
6+
file: '.github/readme/synth.metadata/synth.metadata'
7+
jsonpath: '$.generatedFiles[*]'
8+
ignoreAuthors:
9+
- 'renovate-bot'
10+
- 'yoshi-automation'
11+
- 'release-please[bot]'

.github/readme/synth.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""This script is used to synthesize generated the README for this library."""
16+
17+
from synthtool.languages import java
18+
19+
java.custom_templates(["java_library/README.md"])

.github/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
releaseType: java-yoshi
2-
bumpMinorPreMajor: true
2+
bumpMinorPreMajor: true

.github/snippet-bot.yml

Whitespace-only changes.

.github/sync-repo-settings.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ branchProtectionRules:
55
- pattern: master
66
isAdminEnforced: true
77
requiredStatusCheckContexts:
8-
- 'codecov/patch'
9-
- 'codecov/project'
10-
- 'cla/google'
8+
- 'codecov/patch'
9+
- 'codecov/project'
10+
- 'cla/google'
1111
requiredApprovingReviewCount: 1
1212
requiresCodeOwnerReviews: true
1313
requiresStrictStatusChecks: true
1414
permissionRules:
15-
- team: Googlers
16-
permission: pull
17-
- team: yoshi-java
18-
permission: push
19-
- team: yoshi-java-admins
20-
permission: admin
21-
- team: yoshi-admins
22-
permission: admin
15+
- team: Googlers
16+
permission: pull
17+
- team: yoshi-java
18+
permission: push
19+
- team: yoshi-java-admins
20+
permission: admin
21+
- team: yoshi-admins
22+
permission: admin

.github/trusted-contribution.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trustedContributors:
2+
- renovate-bot

.github/workflows/ci.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- master
55
pull_request:
66
name: ci
77
jobs:
@@ -12,27 +12,27 @@ jobs:
1212
JVM_OPTS: -Xmx3200m
1313
TERM: dumb
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-java@v1
17-
with:
18-
java-version: 8
19-
- run: java -version
20-
- name: Gradle Assemble
21-
run: ./gradlew assemble
22-
- name: Gradle Test
23-
run: ./gradlew test
24-
- name: Gradle Build
25-
run: ./gradlew build install
26-
- name: coverage
27-
uses: codecov/codecov-action@v1
28-
with:
29-
name: actions ${{ matrix.java }}
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-java@v1
17+
with:
18+
java-version: 8
19+
- run: java -version
20+
- name: Gradle Assemble
21+
run: ./gradlew assemble
22+
- name: Gradle Test
23+
run: ./gradlew test
24+
- name: Gradle Build
25+
run: ./gradlew build install
26+
- name: coverage
27+
uses: codecov/codecov-action@v1
28+
with:
29+
name: actions ${{ matrix.java }}
3030
format:
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v2
34-
- uses: actions/setup-java@v1
35-
with:
36-
java-version: 8
37-
- name: Java Linter
38-
run: ./gradlew googleJavaFormat
33+
- uses: actions/checkout@v2
34+
- uses: actions/setup-java@v1
35+
with:
36+
java-version: 8
37+
- name: Java Linter
38+
run: ./gradlew googleJavaFormat

.kokoro/build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: See documentation in type-shell-output.bat
2+
3+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2019 Google Inc.
2+
# Copyright 2019 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/coerce_logs.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
# Copyright 2019 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+
# This script finds and moves sponge logs so that they can be found by placer
17+
# and are not flagged as flaky by sponge.
18+
19+
set -eo pipefail
20+
21+
## Get the directory of the build script
22+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
23+
## cd to the parent directory, i.e. the root of the git repo
24+
cd ${scriptDir}/..
25+
26+
job=$(basename ${KOKORO_JOB_NAME})
27+
28+
echo "coercing sponge logs..."
29+
for xml in `find . -name *-sponge_log.xml`
30+
do
31+
echo "processing ${xml}"
32+
class=$(basename ${xml} | cut -d- -f2)
33+
dir=$(dirname ${xml})/${job}/${class}
34+
text=$(dirname ${xml})/${class}-sponge_log.txt
35+
mkdir -p ${dir}
36+
mv ${xml} ${dir}/sponge_log.xml
37+
mv ${text} ${dir}/sponge_log.txt
38+
done

.kokoro/common.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ build_file: "api-common-java/.kokoro/trampoline.sh"
88

99
# Tell the trampoline which build file to use.
1010
env_vars: {
11-
key: "TRAMPOLINE_BUILD_FILE"
12-
value: "github/api-common-java/.kokoro/build.sh"
11+
key: "TRAMPOLINE_BUILD_FILE"
12+
value: "github/api-common-java/.kokoro/build.sh"
1313
}

.kokoro/common.sh

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
${command}
29+
exit_code=$?
30+
31+
# restore "e" flag
32+
if [[ ${flags} =~ e ]]
33+
then set -e
34+
else set +e
35+
fi
36+
37+
if [[ $exit_code == 0 ]]
38+
then
39+
return 0
40+
fi
41+
42+
# failure
43+
if [[ ${attempts_left} > 0 ]]
44+
then
45+
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
46+
sleep ${sleep_seconds}
47+
new_attempts=$((${attempts_left} - 1))
48+
new_sleep=$((${sleep_seconds} * 2))
49+
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
50+
fi
51+
52+
return $exit_code
53+
}
54+
55+
## Helper functionss
56+
function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; }
57+
function msg() { println "$*" >&2; }
58+
function println() { printf '%s\n' "$(now) $*"; }

.kokoro/continuous/common.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
action {
55
define_artifacts {
66
regex: "**/*sponge_log.xml"
7+
regex: "**/*sponge_log.txt"
78
}
89
}
910

.kokoro/continuous/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

0 commit comments

Comments
 (0)