Skip to content

Commit 8b1d826

Browse files
Merge branch 'googleapis:main' into main
2 parents 5a0873a + 6d03337 commit 8b1d826

File tree

1,155 files changed

+496427
-13338
lines changed

Some content is hidden

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

1,155 files changed

+496427
-13338
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77

88
# java-vertexai has maintainers
99
/java-vertexai/ @googleapis/vertexai-team @googleapis/cloud-sdk-java-team
10+
/java-bigquerystorage/ @googleapis/bigquery-team @googleapis/cloud-sdk-java-team

.github/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
40-
- uses: googleapis/sdk-platform-java/.github/scripts@v2.66.1
40+
- uses: googleapis/sdk-platform-java/.github/scripts@v2.67.0
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
base_ref: ${{ github.base_ref }}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
on:
2+
push:
3+
paths-ignore:
4+
- 'tutorials/**'
5+
branches:
6+
- main
7+
pull_request:
8+
name: java-bigquerystorage ci
9+
env:
10+
BUILD_SUBDIR: java-bigquerystorage
11+
jobs:
12+
filter:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
library: ${{ steps.filter.outputs.library }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dorny/paths-filter@v3
19+
id: filter
20+
with:
21+
filters: |
22+
library:
23+
- 'java-bigquerystorage/**'
24+
units:
25+
needs: filter
26+
if: ${{ needs.filter.outputs.library == 'true' }}
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
java: [11, 17, 21, 25]
32+
steps:
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
34+
- uses: actions/setup-java@v2
35+
with:
36+
distribution: temurin
37+
java-version: ${{matrix.java}}
38+
- run: java -version
39+
- run: .kokoro/build.sh
40+
env:
41+
JOB_TYPE: test
42+
units-java8:
43+
needs: filter
44+
if: ${{ needs.filter.outputs.library == 'true' }}
45+
# Building using Java 17 and run the tests with Java 8 runtime
46+
name: "units (8)"
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
50+
- uses: actions/setup-java@v3
51+
with:
52+
java-version: 8
53+
distribution: zulu
54+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
55+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
56+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
57+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
58+
shell: bash
59+
- uses: actions/setup-java@v3
60+
with:
61+
java-version: 17
62+
distribution: zulu
63+
- run: .kokoro/build.sh
64+
env:
65+
JOB_TYPE: test
66+
windows:
67+
needs: filter
68+
if: ${{ needs.filter.outputs.library == 'true' }}
69+
runs-on: windows-latest
70+
steps:
71+
- name: Support longpaths
72+
run: git config --system core.longpaths true
73+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
74+
- uses: actions/setup-java@v2
75+
with:
76+
distribution: temurin
77+
java-version: 8
78+
- run: java -version
79+
- run: .kokoro/build.sh
80+
env:
81+
JOB_TYPE: test
82+
dependencies:
83+
needs: filter
84+
if: ${{ needs.filter.outputs.library == 'true' }}
85+
runs-on: ubuntu-latest
86+
strategy:
87+
matrix:
88+
java: [17]
89+
steps:
90+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
91+
- uses: actions/setup-java@v2
92+
with:
93+
distribution: temurin
94+
java-version: ${{matrix.java}}
95+
- run: java -version
96+
- run: .kokoro/dependencies.sh
97+
javadoc:
98+
needs: filter
99+
if: ${{ needs.filter.outputs.library == 'true' }}
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
103+
- uses: actions/setup-java@v3
104+
with:
105+
distribution: temurin
106+
java-version: 17
107+
- run: java -version
108+
- run: .kokoro/build.sh
109+
env:
110+
JOB_TYPE: javadoc
111+
lint:
112+
needs: filter
113+
if: ${{ needs.filter.outputs.library == 'true' }}
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
117+
- uses: actions/setup-java@v2
118+
with:
119+
distribution: temurin
120+
java-version: 17
121+
- run: java -version
122+
- run: .kokoro/build.sh
123+
env:
124+
JOB_TYPE: lint
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Copyright 2022 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+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
name: java-datastore ci
22+
env:
23+
BUILD_SUBDIR: java-datastore
24+
jobs:
25+
filter:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
library: ${{ steps.filter.outputs.library }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
with:
34+
filters: |
35+
library:
36+
- 'java-datastore/**'
37+
units:
38+
needs: filter
39+
if: ${{ needs.filter.outputs.library == 'true' }}
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
java: [11, 17, 21, 25]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-java@v4
48+
with:
49+
distribution: temurin
50+
java-version: ${{matrix.java}}
51+
- run: java -version
52+
- run: .kokoro/build.sh
53+
env:
54+
JOB_TYPE: test
55+
units-java8:
56+
needs: filter
57+
if: ${{ needs.filter.outputs.library == 'true' }}
58+
# Building using Java 17 and run the tests with Java 8 runtime
59+
name: "units (8)"
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v4
64+
with:
65+
java-version: 8
66+
distribution: temurin
67+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
68+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
69+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
70+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
71+
shell: bash
72+
- uses: actions/setup-java@v4
73+
with:
74+
java-version: 17
75+
distribution: temurin
76+
- run: .kokoro/build.sh
77+
env:
78+
JOB_TYPE: test
79+
windows:
80+
needs: filter
81+
if: ${{ needs.filter.outputs.library == 'true' }}
82+
# Building using Java 11 and run the tests with Java 8 runtime
83+
runs-on: windows-latest
84+
steps:
85+
- name: Support longpaths
86+
run: git config --system core.longpaths true
87+
- name: Support longpaths
88+
run: git config --system core.longpaths true
89+
- uses: actions/checkout@v4
90+
- uses: actions/setup-java@v4
91+
with:
92+
java-version: 8
93+
distribution: temurin
94+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
95+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}\bin\java -P !java17" >> $GITHUB_ENV
96+
shell: bash
97+
- uses: actions/setup-java@v4
98+
with:
99+
distribution: temurin
100+
java-version: 11
101+
- run: java -version
102+
- run: .kokoro/build.sh
103+
env:
104+
JOB_TYPE: test
105+
dependencies:
106+
needs: filter
107+
if: ${{ needs.filter.outputs.library == 'true' }}
108+
runs-on: ubuntu-latest
109+
strategy:
110+
matrix:
111+
java: [17]
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: actions/setup-java@v4
115+
with:
116+
distribution: temurin
117+
java-version: ${{matrix.java}}
118+
- run: java -version
119+
- run: .kokoro/dependencies.sh
120+
javadoc:
121+
needs: filter
122+
if: ${{ needs.filter.outputs.library == 'true' }}
123+
runs-on: ubuntu-latest
124+
steps:
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-java@v4
127+
with:
128+
distribution: temurin
129+
java-version: 17
130+
- run: java -version
131+
- run: .kokoro/build.sh
132+
env:
133+
JOB_TYPE: javadoc
134+
lint:
135+
needs: filter
136+
if: ${{ needs.filter.outputs.library == 'true' }}
137+
runs-on: ubuntu-latest
138+
steps:
139+
- uses: actions/checkout@v4
140+
- uses: actions/setup-java@v4
141+
with:
142+
distribution: temurin
143+
java-version: 17
144+
- run: java -version
145+
- run: .kokoro/build.sh
146+
env:
147+
JOB_TYPE: lint

.kokoro/build.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,21 @@ case ${JOB_TYPE} in
9494
install_modules "${BUILD_SUBDIR}"
9595
echo "Running in subdir: ${BUILD_SUBDIR}"
9696
pushd "${BUILD_SUBDIR}"
97+
98+
if [[ "${BUILD_SUBDIR}" == "java-datastore" ]]; then
99+
# Kokoro integration tests use both JDK 11 and JDK 8. Integration
100+
# tests require JDK 11 export as JAVA env variable to run cloud datastore
101+
# emulator (https://cloud.google.com/sdk/docs/release-notes#39300_2022-07-12).
102+
# For Java 8 environment, we will still run the tests using Java 8 with
103+
# SUREFIRE_JVM_OPT for Maven surefire plugin:
104+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
105+
if [[ -n "${JAVA11_HOME}" && -n "${JAVA8_HOME}" ]]
106+
then
107+
export JAVA=${JAVA11_HOME}/bin/java
108+
export SUREFIRE_JVM_OPT=-Djvm=${JAVA8_HOME}/bin/java
109+
fi
110+
fi
111+
97112
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
98113
echo "INTEGRATION_TEST_ARGS: ${INTEGRATION_TEST_ARGS}"
99114
mvn verify -Penable-integration-tests \
@@ -110,7 +125,7 @@ case ${JOB_TYPE} in
110125
-Djacoco.skip=true \
111126
-DskipUnitTests=true \
112127
-Dmaven.wagon.http.retryHandler.count=5 \
113-
-T 1C ${SUREFIRE_JVM_OPT}
128+
${SUREFIRE_JVM_OPT}
114129

115130
RETURN_CODE=$?
116131
popd

.kokoro/common.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ excluded_modules=(
1919
'google-cloud-pom-parent'
2020
'java-vertexai'
2121
'java-logging'
22+
'java-bigquerystorage'
23+
'java-datastore'
2224
)
2325

2426
function retry_with_backoff {
@@ -203,7 +205,7 @@ function generate_modified_modules_list() {
203205
if [[ -n $modules ]]; then
204206
modules=$(echo "${modules}" | cut -d '/' -f1 | sort -u)
205207
for module in $modules; do
206-
if [[ ! " ${excluded_modules[*]} " =~ " ${module} " && " ${maven_modules[*]} " =~ " ${module} " ]]; then
208+
if [[ " ${maven_modules[*]} " =~ " ${module} " ]]; then
207209
modified_module_list+=("${module}")
208210
fi
209211
done
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.56.1"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm-single"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}
34+
35+
env_vars: {
36+
key: "ENABLE_FLAKYBOT"
37+
value: "false"
38+
}
39+
40+
env_vars: {
41+
key: "BUILD_SUBDIR"
42+
value: "java-bigquerystorage"
43+
}
44+
45+
env_vars: {
46+
key: "INTEGRATION_TEST_ARGS"
47+
value: "-Dit.test=!ITBigQueryWrite*RetryTest -Dsurefire.failIfNoSpecifiedTests=false -Dfailsafe.failIfNoSpecifiedTests=false"
48+
}

0 commit comments

Comments
 (0)