Skip to content

Commit 9d02190

Browse files
chore: merge main into generate-libraries-main
2 parents 7dac2c2 + 39133b5 commit 9d02190

File tree

2,149 files changed

+1069537
-84
lines changed

Some content is hidden

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

2,149 files changed

+1069537
-84
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99
/java-vertexai/ @googleapis/vertexai-team @googleapis/cloud-sdk-java-team
1010
/java-bigquerystorage/ @googleapis/bigquery-team @googleapis/cloud-sdk-java-team
1111
/java-bigquery/ @googleapis/bigquery-team @googleapis/cloud-sdk-java-team
12+
/java-spanner/ @googleapis/spanner-team @googleapis/cloud-sdk-java-team
13+
/java-spanner-jdbc/ @googleapis/spanner-team @googleapis/cloud-sdk-java-team

.github/workflows/ci.yaml

Lines changed: 88 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,85 @@ jobs:
5353
id: date
5454
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
5555
- uses: actions/checkout@v4
56+
- uses: actions/setup-java@v4
57+
with:
58+
java-version: 8
59+
distribution: temurin
60+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
61+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
62+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
63+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
64+
shell: bash
65+
- uses: actions/setup-java@v4
66+
with:
67+
java-version: 11
68+
distribution: temurin
69+
cache: maven
70+
- uses: actions/cache@v4
71+
id: mvn-cache
72+
with:
73+
path: ~/.m2/repository
74+
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
75+
- run: .kokoro/build.sh
76+
shell: bash
77+
env:
78+
JOB_TYPE: test
79+
JOB_NAME: units-8-runtime-${{matrix.java}}
80+
# detect which libraries have changed
81+
changes:
82+
runs-on: ubuntu-latest
83+
permissions:
84+
pull-requests: read
85+
outputs:
86+
packages: ${{ steps.filter.outputs.changes }}
87+
steps:
88+
- uses: dorny/paths-filter@v4
89+
id: filter
90+
with:
91+
filters: |
92+
java-bigquery: java-bigquery/**
93+
java-bigquerystorage: java-bigquerystorage/**
94+
java-datastore: java-datastore/**
95+
java-logging: java-logging/**
96+
java-logging-logback: java-logging-logback/**
97+
java-spanner: java-spanner/**
98+
sdk-platform-java: sdk-platform-java/**
99+
split-units:
100+
runs-on: ubuntu-latest
101+
needs: changes
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
106+
java: [11, 17, 21, 25]
107+
steps:
108+
- name: Get current week within the year
109+
id: date
110+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
111+
- uses: actions/checkout@v4
112+
- uses: actions/setup-java@v4
113+
with:
114+
distribution: temurin
115+
java-version: ${{matrix.java}}
116+
- run: .kokoro/build.sh
117+
env:
118+
BUILD_SUBDIR: ${{matrix.package}}
119+
JOB_TYPE: test
120+
JOB_NAME: units-${{matrix.package}}-${{matrix.java}}
121+
split-units-8:
122+
runs-on: ubuntu-latest
123+
name: "split-units"
124+
needs: changes
125+
strategy:
126+
fail-fast: false
127+
matrix:
128+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
129+
java: [8]
130+
steps:
131+
- name: Get current week within the year
132+
id: date
133+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
134+
- uses: actions/checkout@v4
56135
- uses: actions/setup-java@v4
57136
with:
58137
java-version: 11
@@ -66,15 +145,16 @@ jobs:
66145
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
67146
- name: Install all modules using Java 11
68147
shell: bash
69-
run: |
70-
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip -Dclirr.skip -Denforcer.skip -Dcheckstyle.skip -Dflatten.skip -Danimal-sniffer.skip -Djacoco.skip
71-
working-directory: sdk-platform-java
148+
run: .kokoro/build.sh
149+
env:
150+
BUILD_SUBDIR: ${{matrix.package}}
151+
JOB_TYPE: install
72152
- uses: actions/setup-java@v4
73153
with:
74-
java-version: 8
154+
java-version: ${{matrix.java}}
75155
distribution: temurin
76156
- run: java -version
77-
- name: Run tests in Java 8 with the source compiled in Java 11
157+
- name: Run tests in Java ${{matrix.java}} with the source compiled in Java 11
78158
run: |
79159
mvn test \
80160
-B -ntp \
@@ -86,11 +166,13 @@ jobs:
86166
-Dflatten.skip=true \
87167
-Danimal.sniffer.skip=true \
88168
-Dmaven.wagon.http.retryHandler.count=5 \
169+
--also-make \
89170
-T 1C
90171
env:
172+
BUILD_SUBDIR: ${{matrix.package}}
91173
JOB_TYPE: test
92174
JOB_NAME: units-8-runtime-${{matrix.java}}
93-
working-directory: sdk-platform-java
175+
working-directory: ${{matrix.package}}
94176
windows:
95177
runs-on: windows-latest
96178
steps:
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: java-spanner integration-tests-against-emulator
7+
jobs:
8+
filter:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
library: ${{ steps.filter.outputs.library }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dorny/paths-filter@v3
15+
id: filter
16+
with:
17+
filters: |
18+
library:
19+
- 'java-spanner/**'
20+
units:
21+
needs: filter
22+
if: ${{ needs.filter.outputs.library == 'true' }}
23+
runs-on: ubuntu-latest
24+
25+
services:
26+
emulator:
27+
image: gcr.io/cloud-spanner-emulator/emulator:latest
28+
ports:
29+
- 9010:9010
30+
- 9020:9020
31+
32+
steps:
33+
- uses: actions/checkout@v6
34+
- uses: actions/setup-java@v5
35+
with:
36+
distribution: temurin
37+
java-version: 11
38+
- name: Running tests
39+
run: .kokoro/build.sh
40+
env:
41+
JOB_TYPE: test
42+
BUILD_SUBDIR: java-spanner
43+
SPANNER_EMULATOR_HOST: localhost:9010
44+
GOOGLE_CLOUD_PROJECT: emulator-test-project
45+
SUREFIRE_JVM_OPT: '-Penable-integration-tests -DskipUnitTests=true -Dspanner.testenv.instance="" -Dmaven.main.skip=true'

.github/workflows/java-bigquery-ci.yaml renamed to .github/workflows/java-spanner-jdbc-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ on:
1818
branches:
1919
- main
2020
pull_request:
21-
name: java-bigquery ci
21+
name: java-spanner-jdbc ci
2222
env:
23-
BUILD_SUBDIR: java-bigquery
23+
BUILD_SUBDIR: java-spanner-jdbc
2424
jobs:
2525
filter:
2626
runs-on: ubuntu-latest
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
filters: |
3535
library:
36-
- 'java-bigquery/**'
36+
- 'java-spanner-jdbc/**'
3737
units:
3838
needs: filter
3939
if: ${{ needs.filter.outputs.library == 'true' }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: java-spanner-jdbc Integration tests against emulator
7+
env:
8+
BUILD_SUBDIR: java-spanner-jdbc
9+
jobs:
10+
filter:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
library: ${{ steps.filter.outputs.library }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dorny/paths-filter@v3
17+
id: filter
18+
with:
19+
filters: |
20+
library:
21+
- 'java-spanner-jdbc/**'
22+
tests-against-emulator:
23+
needs: filter
24+
if: ${{ needs.filter.outputs.library == 'true' }}
25+
runs-on: ubuntu-latest
26+
27+
services:
28+
emulator:
29+
image: gcr.io/cloud-spanner-emulator/emulator:latest
30+
ports:
31+
- 9010:9010
32+
- 9020:9020
33+
34+
steps:
35+
- uses: actions/checkout@v6
36+
- uses: actions/setup-java@v5
37+
with:
38+
distribution: temurin
39+
java-version: 17
40+
- run: java -version
41+
- name: Install dependencies for the integration test
42+
run: .kokoro/build.sh
43+
env:
44+
JOB_TYPE: test
45+
- run: mvn -B -Dspanner.testenv.instance="" -Penable-integration-tests -DtrimStackTrace=false -Dclirr.skip=true -Denforcer.skip=true -fae verify
46+
working-directory: java-spanner-jdbc
47+
env:
48+
SPANNER_EMULATOR_HOST: localhost:9010
49+
GOOGLE_CLOUD_PROJECT: emulator-test-project
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2024 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+
pull_request:
18+
name: java-spanner-jdbc quickperf
19+
env:
20+
BUILD_SUBDIR: java-spanner-jdbc
21+
jobs:
22+
filter:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
library: ${{ steps.filter.outputs.library }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dorny/paths-filter@v3
29+
id: filter
30+
with:
31+
filters: |
32+
library:
33+
- 'java-spanner-jdbc/**'
34+
quickperf:
35+
needs: filter
36+
if: ${{ needs.filter.outputs.library == 'true' }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-java@v5
41+
with:
42+
distribution: temurin
43+
java-version: 17
44+
- name: Run tests
45+
run: mvn test
46+
working-directory: java-spanner-jdbc/samples/quickperf
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2024 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+
pull_request:
18+
name: java-spanner-jdbc samples
19+
env:
20+
BUILD_SUBDIR: java-spanner-jdbc
21+
jobs:
22+
filter:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
library: ${{ steps.filter.outputs.library }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dorny/paths-filter@v3
29+
id: filter
30+
with:
31+
filters: |
32+
library:
33+
- 'java-spanner-jdbc/**'
34+
test:
35+
needs: filter
36+
if: ${{ needs.filter.outputs.library == 'true' }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-java@v5
41+
with:
42+
distribution: temurin
43+
java-version: 8
44+
- name: Run sample tests
45+
run: mvn --quiet --batch-mode test
46+
working-directory: java-spanner-jdbc/samples/snippets
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2023 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+
pull_request:
18+
name: java-spanner-jdbc spring-data-jdbc-sample
19+
env:
20+
BUILD_SUBDIR: java-spanner-jdbc
21+
jobs:
22+
filter:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
library: ${{ steps.filter.outputs.library }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dorny/paths-filter@v3
29+
id: filter
30+
with:
31+
filters: |
32+
library:
33+
- 'java-spanner-jdbc/**'
34+
spring-data-jdbc:
35+
needs: filter
36+
if: ${{ needs.filter.outputs.library == 'true' }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-java@v5
41+
with:
42+
distribution: temurin
43+
java-version: 17
44+
- name: Run tests on GoogleSQL
45+
run: mvn test
46+
working-directory: java-spanner-jdbc/samples/spring-data-jdbc/googlesql
47+
- name: Run tests on PostgreSQL
48+
run: mvn test
49+
working-directory: java-spanner-jdbc/samples/spring-data-jdbc/postgresql

0 commit comments

Comments
 (0)