Skip to content

Commit 483e073

Browse files
Merge branch 'main' into jdbc/otel-clean-branch
2 parents 44a371b + c08d553 commit 483e073

File tree

3,521 files changed

+151717
-4364
lines changed

Some content is hidden

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

3,521 files changed

+151717
-4364
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/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requests==2.32.4
1+
requests==2.33.0

.github/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ idna==3.7 \
104104
--hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \
105105
--hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0
106106
# via requests
107-
requests==2.32.4 \
108-
--hash=sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c \
109-
--hash=sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422
107+
requests==2.33.0 \
108+
--hash=sha256:3324635456fa185245e24865e810cecec7b4caf933d7eb133dcde67d48cee69b \
109+
--hash=sha256:c7ebc5e8b0f21837386ad0e1c8fe8b829fa5f544d8df3b2253bff14ef29d7652
110110
# via -r requirements.in
111111
urllib3==2.6.3 \
112112
--hash=sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed \

.github/workflows/ci.yaml

Lines changed: 35 additions & 5 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,10 +263,11 @@ 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
240-
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.54.0
270+
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
241271
with:
242272
bom-path: gapic-libraries-bom/pom.xml
243273
generation-config-check:

.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-dependency_compatibility_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ jobs:
8888
# Need to cd out of the directory to get the scripts as this step is run inside the java-showcase directory
8989
run: |
9090
if [[ -n "${{ env.DEPENDENCIES_LIST }}" ]]; then
91-
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
91+
../.github/scripts/test_dependency_compatibility.sh -l ${{ env.DEPENDENCIES_LIST }}
9292
else
93-
../sdk-platform-java/.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
93+
../.github/scripts/test_dependency_compatibility.sh -f ../dependencies.txt
9494
fi
9595
working-directory: sdk-platform-java/java-showcase

.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:

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
git checkout -b "${head_ref}" fork/${head_ref}
4444
changed_directories="$(git diff --name-only "fork/${head_ref}" "origin/${base_ref}")"
4545
fi
46-
if [[ ${changed_directories} =~ "hermetic_build/" ]] || [[ ${changed_directories} =~ ".cloudbuild/library_generation/" ]]; then
46+
if [[ ${changed_directories} =~ "sdk-platform-java/hermetic_build/" ]] || [[ ${changed_directories} =~ "sdk-platform-java/.cloudbuild/library_generation/" ]]; then
4747
echo "should_run=true" >> $GITHUB_OUTPUT
4848
else
4949
echo "should_run=false" >> $GITHUB_OUTPUT
@@ -58,6 +58,9 @@ jobs:
5858
needs: [filter, should-run-library-generation-tests]
5959
if: needs.filter.outputs.library == 'true' && needs.should-run-library-generation-tests.outputs.should_run == 'true'
6060
runs-on: ubuntu-22.04
61+
defaults:
62+
run:
63+
working-directory: sdk-platform-java
6164
steps:
6265
- uses: actions/checkout@v4
6366
- uses: actions/setup-python@v5
@@ -86,12 +89,15 @@ jobs:
8689
needs: [filter, should-run-library-generation-tests]
8790
if: needs.filter.outputs.library == 'true' && needs.should-run-library-generation-tests.outputs.should_run == 'true'
8891
runs-on: ubuntu-22.04
92+
defaults:
93+
run:
94+
working-directory: sdk-platform-java
8995
steps:
9096
- uses: actions/checkout@v4
9197
- name: Run ShellCheck
9298
uses: ludeeus/action-shellcheck@2.0.0
9399
with:
94-
scandir: 'hermetic_build'
100+
scandir: 'sdk-platform-java/hermetic_build'
95101
format: tty
96102
severity: error
97103
ignore_paths:
@@ -100,6 +106,9 @@ jobs:
100106
needs: [filter, should-run-library-generation-tests]
101107
if: needs.filter.outputs.library == 'true' && needs.should-run-library-generation-tests.outputs.should_run == 'true'
102108
runs-on: ubuntu-22.04
109+
defaults:
110+
run:
111+
working-directory: sdk-platform-java
103112
steps:
104113
- uses: actions/checkout@v4
105114
- uses: actions/setup-python@v5

0 commit comments

Comments
 (0)