Skip to content

Commit b4ea6aa

Browse files
authored
Merge branch 'main' into kirl/change_shaded_jar_license
2 parents b10e369 + 92f300a commit b4ea6aa

6,689 files changed

Lines changed: 2436831 additions & 2005 deletions

File tree

Some content is hidden

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

.bazeliskrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See https://github.com/bazelbuild/bazelisk
2+
# Version required for Java 24 support (https://github.com/bazelbuild/bazel/commit/806a6e82320956b63f1351ebe2b0da8483f36f19).
3+
USE_BAZEL_VERSION=7.7.0

.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
startup --batch
2+
3+
build --show_timestamps
4+
build --protocopt=--experimental_allow_proto3_optional
5+
6+
build --cxxopt=-std=c++14
7+
build --host_cxxopt=-std=c++14

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
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

.github/workflows/ci.yaml

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
java: [8, 11, 17, 21, 25]
28+
java: [11, 17, 21, 25]
2929
steps:
3030
- name: Get current week within the year
3131
id: date
@@ -45,6 +45,134 @@ jobs:
4545
env:
4646
JOB_TYPE: test
4747
JOB_NAME: units-${{matrix.java}}
48+
units-8-runtime:
49+
runs-on: ubuntu-latest
50+
name: "units (8)"
51+
steps:
52+
- name: Get current week within the year
53+
id: date
54+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
55+
- 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
135+
- uses: actions/setup-java@v4
136+
with:
137+
java-version: 11
138+
distribution: temurin
139+
cache: maven
140+
- run: java -version
141+
- uses: actions/cache@v4
142+
id: mvn-cache
143+
with:
144+
path: ~/.m2/repository
145+
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
146+
- name: Install all modules using Java 11
147+
shell: bash
148+
run: .kokoro/build.sh
149+
env:
150+
BUILD_SUBDIR: ${{matrix.package}}
151+
JOB_TYPE: install
152+
- uses: actions/setup-java@v4
153+
with:
154+
java-version: ${{matrix.java}}
155+
distribution: temurin
156+
- run: java -version
157+
- name: Run tests in Java ${{matrix.java}} with the source compiled in Java 11
158+
run: |
159+
mvn test \
160+
-B -ntp \
161+
-Dorg.slf4j.simpleLogger.showDateTime=true \
162+
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
163+
-Dclirr.skip=true \
164+
-Denforcer.skip=true \
165+
-Dcheckstyle.skip=true \
166+
-Dflatten.skip=true \
167+
-Danimal.sniffer.skip=true \
168+
-Dmaven.wagon.http.retryHandler.count=5 \
169+
--also-make \
170+
-T 1C
171+
env:
172+
BUILD_SUBDIR: ${{matrix.package}}
173+
JOB_TYPE: test
174+
JOB_NAME: units-8-runtime-${{matrix.java}}
175+
working-directory: ${{matrix.package}}
48176
windows:
49177
runs-on: windows-latest
50178
steps:

.github/workflows/generated_files_sync.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
pull_request:
1818
name: generation diff
1919
env:
20-
library_generation_image_tag: 2.68.0
20+
library_generation_image_tag: 2.68.1-SNAPSHOT # {x-version-update:gapic-generator-java:current}
2121
jobs:
2222
root-pom:
2323
# root pom.xml does not have diff from generated one
@@ -171,6 +171,8 @@ jobs:
171171
# the rest : the same as above
172172
invalid_files=$(find . -name '*.java' \
173173
|grep --invert-match 'java/com/google' \
174+
|grep --invert-match '/test/' \
175+
|grep --invert-match '/tests/' \
174176
|grep --invert-match samples \
175177
|grep --invert-match benchmark \
176178
|grep --invert-match grafeas \

.github/workflows/hermetic_library_generation.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ jobs:
3737
with:
3838
fetch-depth: 0
3939
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
40-
- uses: googleapis/sdk-platform-java/.github/scripts@v2.68.0
40+
- uses: ./sdk-platform-java/.github/scripts
4141
if: env.SHOULD_RUN == 'true'
4242
with:
4343
base_ref: ${{ github.base_ref }}
4444
head_ref: ${{ github.head_ref }}
4545
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
46+
image_tag: 2.68.1-SNAPSHOT # {x-version-update:gapic-generator-java:current}
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'
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: sdk-platform-java Run dependency analyzer
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
system:
6+
description: the package management system
7+
required: true
8+
type: choice
9+
default: maven
10+
options:
11+
- maven
12+
name:
13+
description: the name of the dependency
14+
required: true
15+
type: string
16+
version:
17+
description: the version of the dependency
18+
required: true
19+
type: string
20+
env:
21+
BUILD_SUBDIR: sdk-platform-java
22+
jobs:
23+
filter:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
library: ${{ steps.filter.outputs.library }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dorny/paths-filter@v3
30+
id: filter
31+
with:
32+
filters: |
33+
library:
34+
- 'sdk-platform-java/**'
35+
Run-dependency-analyzer:
36+
needs: filter
37+
if: ${{ needs.filter.outputs.library == 'true' }}
38+
runs-on: ubuntu-22.04
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-java@v4
42+
with:
43+
distribution: temurin
44+
java-version: 17
45+
cache: maven
46+
- name: Set up Maven
47+
uses: stCarolas/setup-maven@v4.5
48+
with:
49+
maven-version: 3.8.2
50+
- name: Install dependency analyzer
51+
shell: bash
52+
run: |
53+
mvn clean install -V --batch-mode --no-transfer-progress -DskipTests
54+
working-directory: java-shared-dependencies/dependency-analyzer
55+
- name: Check dependency information
56+
shell: bash
57+
run: |
58+
mvn exec:java -Ddep.system=${{ github.event.inputs.system }} -Ddep.name=${{ github.event.inputs.name }} -Ddep.version=${{ github.event.inputs.version }}
59+
working-directory: java-shared-dependencies/dependency-analyzer

0 commit comments

Comments
 (0)