Skip to content

Commit aa57c09

Browse files
authored
Merge branch 'main' into remove-dev-gate
2 parents e871169 + c2147fc commit aa57c09

File tree

2,907 files changed

+146695
-421393
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,907 files changed

+146695
-421393
lines changed

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ primaryBranch: main
22
releaseType: java-yoshi
33
manifest: true
44
handleGHRelease: true
5+
onDemand: true
56
branches:
67
- branch: 1.0.x
78
releaseType: java-backport

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 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

.github/workflows/generated_files_sync.yaml

Lines changed: 1 addition & 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.1-SNAPSHOT # {x-version-update:gapic-generator-java:current}
20+
library_generation_image_tag: 2.69.0 # {x-version-update:gapic-generator-java:current}
2121
jobs:
2222
root-pom:
2323
# root pom.xml does not have diff from generated one

.github/workflows/hermetic_library_generation.yaml

Lines changed: 2 additions & 1 deletion
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-
image_tag: 2.68.1-SNAPSHOT # {x-version-update:gapic-generator-java:current}
46+
force_regenerate_all: ${{ github.event.pull_request.head.ref == 'generate-libraries-main' }}
47+
image_tag: 2.69.0 # {x-version-update:gapic-generator-java:current}

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

Lines changed: 77 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ jobs:
3333
cache: maven
3434
- run: java -version
3535
- name: Unit Tests
36-
run: |
37-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
38-
-Dfmt.skip -DenableTestCoverage
39-
working-directory: sdk-platform-java
36+
shell: bash
37+
run: .kokoro/build.sh
38+
env:
39+
BUILD_SUBDIR: sdk-platform-java
40+
JOB_TYPE: test
4041
# The `envVarTest` profile runs tests that require an environment variable
4142
- name: Env Var Tests
4243
run: |
@@ -49,10 +50,12 @@ jobs:
4950
GOOGLE_SDK_JAVA_LOGGING: true
5051
working-directory: sdk-platform-java
5152
- run: bazelisk version
52-
- name: Install Maven modules
53-
run: |
54-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
55-
working-directory: sdk-platform-java
53+
- name: Install all modules using Java 11
54+
shell: bash
55+
run: .kokoro/build.sh
56+
env:
57+
BUILD_SUBDIR: sdk-platform-java
58+
JOB_TYPE: install
5659
- name: Integration Tests
5760
run: |
5861
bazelisk --batch test //sdk-platform-java/test/integration/...
@@ -89,26 +92,29 @@ jobs:
8992
cache: maven
9093
- run: java -version
9194
- name: Unit Tests
92-
run: |
93-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
94-
-Dfmt.skip -DenableTestCoverage
95-
working-directory: sdk-platform-java
95+
shell: bash
96+
run: .kokoro/build.sh
97+
env:
98+
BUILD_SUBDIR: sdk-platform-java
99+
JOB_TYPE: test
96100
# The `envVarTest` profile runs tests that require an environment variable
97101
- name: Env Var Tests
98-
run: |
99-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
100-
-Dfmt.skip -DenableTestCoverage -PenvVarTest
101-
# Set the Env Var for this step only
102+
shell: bash
103+
run: .kokoro/build.sh
102104
env:
105+
BUILD_SUBDIR: sdk-platform-java
106+
JOB_TYPE: test
107+
SUREFIRE_JVM_OPT: '-PenvVarTest'
103108
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
104109
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
105110
GOOGLE_SDK_JAVA_LOGGING: true
106-
working-directory: sdk-platform-java
107111
- run: bazelisk version
108-
- name: Install Maven modules
109-
run: |
110-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
111-
working-directory: sdk-platform-java
112+
- name: Install all modules using Java 11
113+
shell: bash
114+
run: .kokoro/build.sh
115+
env:
116+
BUILD_SUBDIR: sdk-platform-java
117+
JOB_TYPE: install
112118
- name: Integration Tests
113119
run: |
114120
bazelisk --batch test //sdk-platform-java/test/integration/...
@@ -127,26 +133,29 @@ jobs:
127133
cache: maven
128134
- run: java -version
129135
- name: Unit Tests
130-
run: |
131-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
132-
-Dfmt.skip -DenableTestCoverage
133-
working-directory: sdk-platform-java
136+
shell: bash
137+
run: .kokoro/build.sh
138+
env:
139+
BUILD_SUBDIR: sdk-platform-java
140+
JOB_TYPE: test
134141
# The `envVarTest` profile runs tests that require an environment variable
135142
- name: Env Var Tests
136-
run: |
137-
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
138-
-Dfmt.skip -DenableTestCoverage -PenvVarTest
139-
# Set the Env Var for this step only
143+
shell: bash
144+
run: .kokoro/build.sh
140145
env:
146+
BUILD_SUBDIR: sdk-platform-java
147+
JOB_TYPE: test
148+
SUREFIRE_JVM_OPT: '-PenvVarTest'
141149
GOOGLE_CLOUD_UNIVERSE_DOMAIN: random.com
142150
GOOGLE_CLOUD_ENABLE_DIRECT_PATH_XDS: true
143151
GOOGLE_SDK_JAVA_LOGGING: true
144-
working-directory: sdk-platform-java
145152
- run: bazelisk version
146-
- name: Install Maven modules
147-
run: |
148-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
149-
working-directory: sdk-platform-java
153+
- name: Install all modules using Java 11
154+
shell: bash
155+
run: .kokoro/build.sh
156+
env:
157+
BUILD_SUBDIR: sdk-platform-java
158+
JOB_TYPE: install
150159
- name: Integration Tests
151160
# note need to set shouldInstallTestSecurityManager=false due to https://github.com/bazelbuild/bazel/issues/24354
152161
run: |
@@ -164,12 +173,17 @@ jobs:
164173
java-version: 8
165174
distribution: temurin
166175
cache: maven
176+
- name: Compile with Java 17 and run tests with Java 8
177+
shell: bash
178+
run: .kokoro/build.sh
179+
env:
180+
BUILD_SUBDIR: sdk-platform-java
181+
JOB_TYPE: install
167182
- run: echo "JAVA8_HOME=${JAVA_HOME}" >> $GITHUB_ENV
168183
- uses: actions/setup-java@v3
169184
with:
170185
java-version: 17
171186
distribution: temurin
172-
- name: Compile with Java 17 and run tests with Java 8
173187
shell: bash
174188
run: |
175189
set -x
@@ -215,9 +229,10 @@ jobs:
215229
cache: maven
216230
- name: Install all modules using Java 11
217231
shell: bash
218-
run: |
219-
mvn -V -B -ntp clean install -DskipTests -Dfmt.skip -Dcheckstyle.skip
220-
working-directory: sdk-platform-java
232+
run: .kokoro/build.sh
233+
env:
234+
BUILD_SUBDIR: sdk-platform-java
235+
JOB_TYPE: install
221236
- uses: actions/setup-java@v3
222237
with:
223238
java-version: 8
@@ -265,9 +280,10 @@ jobs:
265280
cache: maven
266281
- name: Install all modules using Java 11
267282
shell: bash
268-
run: |
269-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
270-
working-directory: sdk-platform-java
283+
run: .kokoro/build.sh
284+
env:
285+
BUILD_SUBDIR: sdk-platform-java
286+
JOB_TYPE: install
271287
- uses: actions/setup-java@v3
272288
with:
273289
java-version: 8
@@ -339,9 +355,11 @@ jobs:
339355
distribution: temurin
340356
- run: mvn -version
341357
- name: Install Maven modules
342-
run: |
343-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
344-
working-directory: sdk-platform-java
358+
shell: bash
359+
run: .kokoro/build.sh
360+
env:
361+
BUILD_SUBDIR: sdk-platform-java
362+
JOB_TYPE: test
345363
- name: Showcase golden tests
346364
working-directory: sdk-platform-java/java-showcase
347365
run: |
@@ -418,9 +436,11 @@ jobs:
418436
distribution: temurin
419437
cache: maven
420438
- name: Install Maven modules
421-
run: |
422-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
423-
working-directory: sdk-platform-java
439+
shell: bash
440+
run: .kokoro/build.sh
441+
env:
442+
BUILD_SUBDIR: sdk-platform-java
443+
JOB_TYPE: install
424444
- name: Install showcase to local maven repository
425445
run: |
426446
mvn install -B -ntp -T 1C -DskipTests
@@ -454,20 +474,11 @@ jobs:
454474
distribution: temurin
455475
cache: maven
456476
- name: Install Maven modules to local Maven repository
457-
run: |
458-
mvn install \
459-
-B -ntp \
460-
-Dorg.slf4j.simpleLogger.showDateTime=true \
461-
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
462-
-DskipTests \
463-
-Dclirr.skip=true \
464-
-Denforcer.skip=true \
465-
-Dcheckstyle.skip=true \
466-
-Dflatten.skip=true \
467-
-Danimal.sniffer.skip=true \
468-
-Dmaven.wagon.http.retryHandler.count=5 \
469-
-T 1C
470-
working-directory: sdk-platform-java
477+
shell: bash
478+
run: .kokoro/build.sh
479+
env:
480+
BUILD_SUBDIR: sdk-platform-java
481+
JOB_TYPE: install
471482
- name: Validate gapic-generator-java-bom
472483
uses: googleapis/java-cloud-bom/tests/validate-bom@47ad868794c5d38ee7eb95d69371a7a79f84d890
473484
with:
@@ -491,9 +502,11 @@ jobs:
491502
mvn test --batch-mode --no-transfer-progress
492503
working-directory: sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
493504
- name: Install Maven modules
494-
run: |
495-
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip
496-
working-directory: sdk-platform-java
505+
shell: bash
506+
run: .kokoro/build.sh
507+
env:
508+
BUILD_SUBDIR: sdk-platform-java
509+
JOB_TYPE: test
497510
- name: Unmanaged dependency check
498511
uses: ./sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check
499512
with:

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ jobs:
5050
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dependencies-list != '' }}
5151
run: echo "DEPENDENCIES_LIST=${{ github.event.inputs.dependencies-list }}" >> $GITHUB_ENV
5252

53+
- name: Install sdk-platform-java modules
54+
shell: bash
55+
run: .kokoro/build.sh
56+
env:
57+
BUILD_SUBDIR: sdk-platform-java
58+
JOB_TYPE: install
59+
5360
# Run in the root module which should test for everything except for showcase
5461
- name: Perform Dependency Compatibility Unit Testing
5562
shell: bash
@@ -61,12 +68,6 @@ jobs:
6168
fi
6269
working-directory: sdk-platform-java
6370

64-
# Install the modules for showcase (Shared-Deps is required to run showcase)
65-
- name: Install sdk-platform-java's modules
66-
# gapic-generator-java requires Java 8 and is irrelevant for this CI
67-
run: mvn -q -B -ntp install --projects '!gapic-generator-java' -Dcheckstyle.skip -Dfmt.skip -DskipTests -Dclirr.skip -T 1C
68-
working-directory: sdk-platform-java
69-
7071
# Set up local showcase server to run the showcase ITs
7172
- name: Parse showcase version
7273
working-directory: sdk-platform-java/java-showcase/gapic-showcase

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,9 @@ jobs:
3232
matrix:
3333
repo:
3434
- java-bigtable
35-
- java-bigquery
3635
- java-firestore
3736
- java-pubsub
3837
- java-pubsublite
39-
- java-spanner-jdbc
40-
- java-spanner
41-
- java-storage
42-
- java-storage-nio
4338
steps:
4439
- uses: actions/checkout@v3
4540
- uses: actions/setup-java@v3
@@ -52,9 +47,9 @@ jobs:
5247
sudo apt-get update
5348
sudo apt-get -y install libxml2-utils
5449
- name: Test helper scripts
55-
run: ./sdk-platform-java/.kokoro/presubmit/common_test.sh
50+
run: .kokoro/common_test.sh
5651
- name: Perform downstream compatibility testing
57-
run: REPOS_UNDER_TEST="${{ matrix.repo }}" ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility.sh
52+
run: REPOS_UNDER_TEST="${{ matrix.repo }}" .kokoro/downstream-compatibility.sh
5853
downstream-compatibility-spring-generator:
5954
needs: filter
6055
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -73,4 +68,4 @@ jobs:
7368
sudo apt-get update
7469
sudo apt-get -y install libxml2-utils
7570
- name: Perform downstream compatibility testing
76-
run: ./sdk-platform-java/.kokoro/presubmit/downstream-compatibility-spring.sh
71+
run: .kokoro/downstream-compatibility-spring.sh

0 commit comments

Comments
 (0)