Skip to content

Commit 82e91d9

Browse files
authored
Merge branch 'main' into datastore-csm-impl-1
2 parents dcbec55 + a9198ee commit 82e91d9

File tree

580 files changed

+194212
-12268
lines changed

Some content is hidden

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

580 files changed

+194212
-12268
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
/java-spanner-jdbc/ @googleapis/spanner-team @googleapis/cloud-sdk-java-team
1414
/google-auth-library-java/ @googleapis/cloud-sdk-auth-team @googleapis/cloud-sdk-java-team
1515
/java-storage/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team
16+
/java-storage-nio/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team

.github/header-checker-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
allowedCopyrightHolders:
22
- 'Google LLC'
3+
- 'Google Inc'
34
- 'The Grafeas Authors'

.github/workflows/ci.yaml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,33 @@ on:
2020
pull_request:
2121
name: ci
2222
jobs:
23+
# detect whether or note we should run "bulk" (non-handwritten) unit tests
24+
bulk-filter:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
pull-requests: read
28+
# Set job outputs to values from filter step
29+
outputs:
30+
src: ${{ steps.filter.outputs.src }}
31+
ci: ${{ steps.filter.outputs.ci }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: dorny/paths-filter@v3
35+
id: filter
36+
with:
37+
# we want to run tests if source code is changed or the scripts
38+
# used to run the unit tests
39+
filters: |
40+
src:
41+
- '**/*.java'
42+
- '**/pom.xml'
43+
ci:
44+
- '.github/workflows/ci.yaml'
45+
- '.kokoro/**'
46+
# these unit tests are "bulk" (non-handwritten) libraries
2347
units:
2448
runs-on: ubuntu-latest
49+
needs: bulk-filter
2550
strategy:
2651
fail-fast: false
2752
matrix:
@@ -42,11 +67,13 @@ jobs:
4267
path: ~/.m2/repository
4368
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
4469
- run: .kokoro/build.sh
70+
if: ${{ needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true' }}
4571
env:
4672
JOB_TYPE: test
4773
JOB_NAME: units-${{matrix.java}}
4874
units-8-runtime:
4975
runs-on: ubuntu-latest
76+
needs: bulk-filter
5077
name: "units (8)"
5178
steps:
5279
- name: Get current week within the year
@@ -73,6 +100,7 @@ jobs:
73100
path: ~/.m2/repository
74101
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
75102
- run: .kokoro/build.sh
103+
if: ${{ needs.bulk-filter.outputs.src == 'true' || needs.bulk-filter.outputs.ci == 'true' }}
76104
shell: bash
77105
env:
78106
JOB_TYPE: test
@@ -220,8 +248,9 @@ jobs:
220248
cache: maven
221249
- run: java -version
222250
- name: Install Maven modules to local Maven repository
223-
run: |
224-
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip
251+
run: .kokoro/build.sh
252+
env:
253+
JOB_TYPE: install
225254
- run: java -version
226255
- run: mvn -B -ntp enforcer:enforce@enforce -T 1C
227256
gapic-libraries-bom:
@@ -234,8 +263,9 @@ jobs:
234263
distribution: temurin
235264
cache: maven
236265
- name: Install Maven modules to local Maven repository
237-
run: |
238-
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip
266+
run: .kokoro/build.sh
267+
env:
268+
JOB_TYPE: install
239269
- name: Validate gapic-libraries-bom
240270
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
241271
with:

.github/workflows/hermetic_library_generation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ jobs:
4343
base_ref: ${{ github.base_ref }}
4444
head_ref: ${{ github.head_ref }}
4545
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
46+
force_regenerate_all: ${{ github.event.pull_request.head.ref == 'generate-libraries-main' }}
4647
image_tag: 2.68.1-SNAPSHOT # {x-version-update:gapic-generator-java:current}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
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-storage-nio ci
22+
env:
23+
BUILD_SUBDIR: java-storage-nio
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-storage-nio/**'
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+
runs-on: windows-latest
83+
steps:
84+
- name: Support longpaths
85+
run: git config --system core.longpaths true
86+
- name: Support longpaths
87+
run: git config --system core.longpaths true
88+
- uses: actions/checkout@v4
89+
- uses: actions/setup-java@v4
90+
with:
91+
distribution: temurin
92+
java-version: 8
93+
- run: java -version
94+
- run: .kokoro/build.sh
95+
env:
96+
JOB_TYPE: test
97+
dependencies:
98+
needs: filter
99+
if: ${{ needs.filter.outputs.library == 'true' }}
100+
runs-on: ubuntu-latest
101+
strategy:
102+
matrix:
103+
java: [17]
104+
steps:
105+
- uses: actions/checkout@v4
106+
- uses: actions/setup-java@v4
107+
with:
108+
distribution: temurin
109+
java-version: ${{matrix.java}}
110+
- run: java -version
111+
- run: .kokoro/dependencies.sh
112+
javadoc:
113+
needs: filter
114+
if: ${{ needs.filter.outputs.library == 'true' }}
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
- uses: actions/setup-java@v4
119+
with:
120+
distribution: temurin
121+
java-version: 17
122+
- run: java -version
123+
- run: .kokoro/build.sh
124+
env:
125+
JOB_TYPE: javadoc
126+
lint:
127+
needs: filter
128+
if: ${{ needs.filter.outputs.library == 'true' }}
129+
runs-on: ubuntu-latest
130+
steps:
131+
- uses: actions/checkout@v4
132+
with:
133+
fetch-depth: 0
134+
- uses: actions/setup-java@v4
135+
with:
136+
distribution: temurin
137+
java-version: 17
138+
- run: java -version
139+
- run: .kokoro/build.sh
140+
env:
141+
JOB_TYPE: lint
142+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
143+
BASE_SHA: ${{ github.event.pull_request.base.sha }}

.github/workflows/sdk-platform-java-downstream_protobuf_compatibility_check_nightly.yaml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,25 @@ on:
1212
schedule:
1313
- cron: '0 1 * * *' # Nightly at 1am
1414

15+
# This job intends to test the compatibility of the Protobuf version against repos not in the
16+
# monorepo. As repos are migrated to the monorepo, this job will be obsolete and turned off.
1517
name: sdk-platform-java Downstream Protobuf Compatibility Check Nightly
16-
env:
17-
BUILD_SUBDIR: sdk-platform-java
1818
jobs:
19-
filter:
20-
runs-on: ubuntu-latest
21-
outputs:
22-
library: ${{ steps.filter.outputs.library }}
23-
steps:
24-
- uses: actions/checkout@v4
25-
- uses: dorny/paths-filter@v3
26-
id: filter
27-
with:
28-
filters: |
29-
library:
30-
- 'sdk-platform-java/**'
3119
downstream-protobuf-test:
32-
needs: filter
3320
# This job runs if any of the three conditions match:
3421
# 1. PR is raised from Release-Please (PR comes from branch: release-please--branches-main)
3522
# 2. Job is invoked by the nightly job (scheduled event)
3623
# 3. Job is manually invoked via Github UI (workflow_dispatch event)
37-
if: needs.filter.outputs.library == 'true' && (github.head_ref == 'release-please--branches--main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
24+
if: github.head_ref == 'release-please--branches--main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
3825
runs-on: ubuntu-22.04
3926
strategy:
4027
fail-fast: false
4128
matrix:
4229
repo:
43-
- google-cloud-java
4430
- java-bigtable
45-
- java-bigquery
4631
- java-firestore
4732
- java-pubsub
4833
- java-pubsublite
49-
- java-spanner-jdbc
50-
- java-spanner
51-
- java-storage
52-
- java-storage-nio
5334
# Default Protobuf-Java versions to use are specified here. Without this, the nightly workflow won't know
5435
# which values to use and would resolve to ''.
5536
protobuf-version: ${{ fromJSON(format('[{0}]', inputs.protobuf_runtime_versions || '"4.33.5"')) }}
@@ -70,7 +51,7 @@ jobs:
7051
- name: Print Protobuf-Java testing version
7152
run: echo "Testing with Protobuf-Java v${{ matrix.protobuf-version }}"
7253
- name: Perform downstream source compatibility testing
73-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version }}" ./.kokoro/nightly/downstream-protobuf-source-compatibility.sh
54+
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version }}" ./sdk-platform-java/.kokoro/nightly/downstream-protobuf-source-compatibility.sh
7455
- name: Perform downstream binary compatibility testing
75-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version }}" ./.kokoro/nightly/downstream-protobuf-binary-compatibility.sh
56+
run: REPOS_UNDER_TEST="${{ matrix.repo }}" PROTOBUF_RUNTIME_VERSION="${{ matrix.protobuf-version }}" ./sdk-platform-java/.kokoro/nightly/downstream-protobuf-binary-compatibility.sh
7657

.github/workflows/sdk-platform-java-nightly.yaml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,8 @@ on:
66
defaults:
77
run:
88
shell: bash
9-
env:
10-
BUILD_SUBDIR: sdk-platform-java
119
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-
- 'sdk-platform-java/**'
2410
nightly:
25-
needs: filter
26-
if: ${{ needs.filter.outputs.library == 'true' }}
2711
strategy:
2812
fail-fast: false
2913
matrix:
@@ -39,8 +23,15 @@ jobs:
3923
distribution: temurin
4024
cache: maven
4125
- run: mvn -version
26+
- name: Install all modules first
27+
shell: bash
28+
run: .kokoro/build.sh
29+
env:
30+
BUILD_SUBDIR: sdk-platform-java
31+
JOB_TYPE: install
4232
- name: Install
4333
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -Dfmt.skip
34+
working-directory: sdk-platform-java
4435
- name: Create issue if previous step fails
4536
if: ${{ failure() }}
4637
env:
@@ -50,8 +41,6 @@ jobs:
5041
--title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
5142
--body "The build has failed : https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"
5243
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
53-
needs: filter
54-
if: ${{ needs.filter.outputs.library == 'true' }}
5544
strategy:
5645
fail-fast: false
5746
matrix:
@@ -66,9 +55,12 @@ jobs:
6655
distribution: temurin
6756
cache: maven
6857
- run: mvn -version
69-
- name: Install with Java 11
70-
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -DskipTests -Dfmt.skip
71-
58+
- name: Install all modules first
59+
shell: bash
60+
run: .kokoro/build.sh
61+
env:
62+
BUILD_SUBDIR: sdk-platform-java
63+
JOB_TYPE: install
7264
- uses: actions/setup-java@v5
7365
with:
7466
java-version: 8
@@ -77,6 +69,7 @@ jobs:
7769
- name: Test with Java 8
7870
# Direct goal invocation ("surefire:test") prevents recompiling tests
7971
run: mvn surefire:test --errors --batch-mode --no-transfer-progress -Dfmt.skip
72+
working-directory: sdk-platform-java
8073
- name: Create issue if previous step fails
8174
if: ${{ failure() }}
8275
env:

.kokoro/common.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ excluded_modules=(
3333
'java-spanner-jdbc'
3434
'google-auth-library-java'
3535
'java-storage'
36+
'java-storage-nio'
3637
)
3738

3839
function retry_with_backoff {
@@ -422,6 +423,16 @@ function install_modules() {
422423
'sdk-platform-java/java-shared-dependencies/first-party-dependencies'
423424
'sdk-platform-java/java-shared-dependencies/third-party-dependencies'
424425
'sdk-platform-java/gapic-generator-java-bom'
426+
'sdk-platform-java/java-iam/grpc-google-iam-v1'
427+
'sdk-platform-java/java-iam/grpc-google-iam-v2'
428+
'sdk-platform-java/java-iam/grpc-google-iam-v2beta'
429+
'sdk-platform-java/java-iam/grpc-google-iam-v3'
430+
'sdk-platform-java/java-iam/grpc-google-iam-v3beta'
431+
'sdk-platform-java/java-iam/proto-google-iam-v1'
432+
'sdk-platform-java/java-iam/proto-google-iam-v2'
433+
'sdk-platform-java/java-iam/proto-google-iam-v2beta'
434+
'sdk-platform-java/java-iam/proto-google-iam-v3'
435+
'sdk-platform-java/java-iam/proto-google-iam-v3beta'
425436
'sdk-platform-java/java-core/google-cloud-core-bom'
426437
'sdk-platform-java/java-core/google-cloud-core'
427438
'sdk-platform-java/java-core/google-cloud-core-grpc'

0 commit comments

Comments
 (0)