Skip to content

Commit 0c7ce4e

Browse files
authored
Merge branch 'main' into kirl/infinite_tcl_results_retrieval
2 parents cf3f18a + 378a3c1 commit 0c7ce4e

File tree

13,415 files changed

+3650240
-17495
lines changed

Some content is hidden

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

13,415 files changed

+3650240
-17495
lines changed

.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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
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
14+
/google-auth-library-java/ @googleapis/cloud-sdk-auth-team @googleapis/cloud-sdk-java-team
15+
/java-storage/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team

.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 \
4.68 KB
Binary file not shown.

.github/scripts/release_manager_merge_bot.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,16 @@ func main() {
213213
}
214214

215215
state = *status.State
216-
log.Printf("Overall status: %s", state)
216+
log.Printf("Overall commit status: %s", state)
217+
if pr.MergeableState != nil {
218+
log.Printf("PR mergeable state: %s", *pr.MergeableState)
219+
if *pr.MergeableState == "dirty" {
220+
fatalError("PR #%d has merge conflicts (dirty).", prNumber)
221+
}
222+
if *pr.MergeableState == "draft" {
223+
fatalError("PR #%d is a draft.", prNumber)
224+
}
225+
}
217226

218227
switch state {
219228
case "failure":
@@ -230,7 +239,19 @@ func main() {
230239
}
231240
retryCount++
232241
case "success":
233-
log.Println("All checks have passed. Merging the pull request...")
242+
// Check if the PR is truly mergeable. MergeableState can be "blocked" if required
243+
// check runs (e.g. GitHub Actions) or reviews are missing, even if CombinedStatus is "success".
244+
// If it's nil, GitHub is still calculating mergeability.
245+
if pr.MergeableState == nil || *pr.MergeableState == "blocked" || *pr.MergeableState == "behind" {
246+
stateStr := "nil"
247+
if pr.MergeableState != nil {
248+
stateStr = *pr.MergeableState
249+
}
250+
log.Printf("Commit status is success, but PR mergeable state is %q. Waiting...", stateStr)
251+
goto wait
252+
}
253+
254+
log.Println("All checks have passed and PR is mergeable. Merging the pull request...")
234255
commitMessage := fmt.Sprintf("Merge pull request #%d from %s/%s", prNumber, owner, repo)
235256
mergeResult, _, err := client.PullRequests.Merge(ctx, owner, repo, prNumber, commitMessage, &github.PullRequestOptions{
236257
MergeMethod: "squash",

.github/workflows/ci.yaml

Lines changed: 131 additions & 2 deletions
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,135 @@ 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-logback: java-logging-logback/**
96+
java-logging: java-logging/**
97+
java-spanner: java-spanner/**
98+
java-storage: java-storage/**
99+
sdk-platform-java: sdk-platform-java/**
100+
split-units:
101+
runs-on: ubuntu-latest
102+
needs: changes
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
107+
java: [11, 17, 21, 25]
108+
steps:
109+
- name: Get current week within the year
110+
id: date
111+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
112+
- uses: actions/checkout@v4
113+
- uses: actions/setup-java@v4
114+
with:
115+
distribution: temurin
116+
java-version: ${{matrix.java}}
117+
- run: .kokoro/build.sh
118+
env:
119+
BUILD_SUBDIR: ${{matrix.package}}
120+
JOB_TYPE: test
121+
JOB_NAME: units-${{matrix.package}}-${{matrix.java}}
122+
split-units-8:
123+
runs-on: ubuntu-latest
124+
name: "split-units"
125+
needs: changes
126+
strategy:
127+
fail-fast: false
128+
matrix:
129+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
130+
java: [8]
131+
steps:
132+
- name: Get current week within the year
133+
id: date
134+
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
135+
- uses: actions/checkout@v4
136+
- uses: actions/setup-java@v4
137+
with:
138+
java-version: 11
139+
distribution: temurin
140+
cache: maven
141+
- run: java -version
142+
- uses: actions/cache@v4
143+
id: mvn-cache
144+
with:
145+
path: ~/.m2/repository
146+
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }}
147+
- name: Install all modules using Java 11
148+
shell: bash
149+
run: .kokoro/build.sh
150+
env:
151+
BUILD_SUBDIR: ${{matrix.package}}
152+
JOB_TYPE: install
153+
- uses: actions/setup-java@v4
154+
with:
155+
java-version: ${{matrix.java}}
156+
distribution: temurin
157+
- run: java -version
158+
- name: Run tests in Java ${{matrix.java}} with the source compiled in Java 11
159+
run: |
160+
mvn test \
161+
-B -ntp \
162+
-Dorg.slf4j.simpleLogger.showDateTime=true \
163+
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
164+
-Dclirr.skip=true \
165+
-Denforcer.skip=true \
166+
-Dcheckstyle.skip=true \
167+
-Dflatten.skip=true \
168+
-Danimal.sniffer.skip=true \
169+
-Dmaven.wagon.http.retryHandler.count=5 \
170+
--also-make \
171+
-T 1C
172+
env:
173+
BUILD_SUBDIR: ${{matrix.package}}
174+
JOB_TYPE: test
175+
JOB_NAME: units-8-runtime-${{matrix.java}}
176+
working-directory: ${{matrix.package}}
48177
windows:
49178
runs-on: windows-latest
50179
steps:
@@ -108,7 +237,7 @@ jobs:
108237
run: |
109238
mvn install -B -ntp -T 1C -DskipTests -Dclirr.skip -Dcheckstyle.skip -Denforcer.skip
110239
- name: Validate gapic-libraries-bom
111-
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.54.0
240+
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
112241
with:
113242
bom-path: gapic-libraries-bom/pom.xml
114243
generation-config-check:

.github/workflows/generated_files_sync.yaml

Lines changed: 4 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,9 @@ 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/' \
176+
|grep --invert-match '/javatests/' \
174177
|grep --invert-match samples \
175178
|grep --invert-match benchmark \
176179
|grep --invert-match grafeas \
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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: google-auth-library-java ci
22+
env:
23+
BUILD_SUBDIR: google-auth-library-java
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+
- 'google-auth-library-java/**'
37+
units-logging:
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+
BUILD_SUBDIR: google-auth-library-java
55+
JOB_TYPE: test
56+
SUREFIRE_JVM_OPT: "-P '!slf4j2x,slf4j2x-test'"

0 commit comments

Comments
 (0)