Skip to content

Commit 0f74f4e

Browse files
authored
Merge branch 'main' into trace-propagation-interceptors
2 parents 30edf72 + f644a19 commit 0f74f4e

File tree

2,295 files changed

+617690
-13296
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,295 files changed

+617690
-13296
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
/java-bigquery/ @googleapis/bigquery-team @googleapis/cloud-sdk-java-team
1212
/java-spanner/ @googleapis/spanner-team @googleapis/cloud-sdk-java-team
1313
/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
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/generated_files_sync.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ jobs:
173173
|grep --invert-match 'java/com/google' \
174174
|grep --invert-match '/test/' \
175175
|grep --invert-match '/tests/' \
176+
|grep --invert-match '/javatests/' \
176177
|grep --invert-match samples \
177178
|grep --invert-match benchmark \
178179
|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'"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ jobs:
6969

7070
# Set up local showcase server to run the showcase ITs
7171
- name: Parse showcase version
72-
working-directory: sdk-plaform-java/java-showcase/gapic-showcase
72+
working-directory: sdk-platform-java/java-showcase/gapic-showcase
7373
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
74-
working-directory: sdk-platform-java
7574
- name: Install showcase server
7675
run: |
7776
sudo mkdir -p /usr/src/showcase

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ jobs:
3030
- 'sdk-platform-java/**'
3131
downstream-protobuf-test:
3232
needs: filter
33-
if: ${{ needs.filter.outputs.library == 'true' }}
3433
# This job runs if any of the three conditions match:
3534
# 1. PR is raised from Release-Please (PR comes from branch: release-please--branches-main)
3635
# 2. Job is invoked by the nightly job (scheduled event)
3736
# 3. Job is manually invoked via Github UI (workflow_dispatch event)
38-
if: github.head_ref == 'release-please--branches--main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
37+
if: needs.filter.outputs.library == 'true' && (github.head_ref == 'release-please--branches--main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
3938
runs-on: ubuntu-22.04
4039
strategy:
4140
fail-fast: false

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
gh issue create \
5050
--title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
51-
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
51+
--body "The build has failed : https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"
5252
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
5353
needs: filter
5454
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -84,4 +84,4 @@ jobs:
8484
run: |
8585
gh issue create \
8686
--title "Nightly-java8 build on ${{ matrix.os }} failed." \
87-
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
87+
--body "The build has failed : https://github.com/googleapis/google-cloud-java/actions/runs/${GITHUB_RUN_ID}"

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ jobs:
2525
- 'sdk-platform-java/**'
2626
upper-bound-check:
2727
needs: filter
28-
if: ${{ needs.filter.outputs.library == 'true' }}
28+
if: needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis'
2929
name: Shared Dependencies BOM upper-bound check
3030
runs-on: ubuntu-latest
31-
if: github.repository_owner == 'googleapis'
3231
steps:
3332
- uses: actions/checkout@v4
3433
- uses: actions/setup-java@v4

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ jobs:
2222
- 'sdk-platform-java/**'
2323
build:
2424
needs: filter
25-
if: ${{ needs.filter.outputs.library == 'true' }}
25+
if: needs.filter.outputs.library == 'true' && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request')
2626
name: Build
27-
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
2827
runs-on: ubuntu-22.04
2928
steps:
3029
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)