Skip to content

Commit bde32cf

Browse files
Merge branch 'main' into jdbc/feature-branch-otel
2 parents 67b84ef + 46d6a86 commit bde32cf

1,643 files changed

Lines changed: 473312 additions & 29283 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,22 @@ jobs:
2929
outputs:
3030
src: ${{ steps.filter.outputs.src }}
3131
ci: ${{ steps.filter.outputs.ci }}
32+
# runnable is true if there are changes outside the .github/workflows directory OR if ci.yaml itself (or kokoro scripts) is modified.
33+
runnable: ${{ fromJSON(steps.filter.outputs.all_count) > fromJSON(steps.filter.outputs.workflows_count) || fromJSON(steps.filter.outputs.ci_count) > 0 }}
3234
steps:
33-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v6
36+
# Use this action, rather than a file filter so that we can make this
37+
# mandatory.
38+
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-including-branches
39+
# for more details.
3440
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
3541
id: filter
3642
with:
3743
filters: |
44+
all:
45+
- '**'
46+
workflows:
47+
- '.github/workflows/**'
3848
src:
3949
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
4050
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
@@ -46,6 +56,7 @@ jobs:
4656
units:
4757
runs-on: ubuntu-latest
4858
needs: bulk-filter
59+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
4960
strategy:
5061
fail-fast: false
5162
matrix:
@@ -73,6 +84,7 @@ jobs:
7384
units-8-runtime:
7485
runs-on: ubuntu-latest
7586
needs: bulk-filter
87+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
7688
name: "units (8)"
7789
steps:
7890
- name: Get current week within the year
@@ -106,13 +118,15 @@ jobs:
106118
JOB_NAME: units-8-runtime-${{matrix.java}}
107119
# detect which libraries have changed
108120
changes:
121+
needs: bulk-filter
122+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
109123
runs-on: ubuntu-latest
110124
permissions:
111125
pull-requests: read
112126
outputs:
113127
packages: ${{ steps.filter.outputs.changes }}
114128
steps:
115-
- uses: actions/checkout@v4
129+
- uses: actions/checkout@v6
116130
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
117131
id: filter
118132
with:
@@ -302,7 +316,7 @@ jobs:
302316
env:
303317
BUILD_SUBDIR: ${{matrix.package}}
304318
required:
305-
needs: [ changes, split-units, split-clirr, split-dependencies ]
319+
needs: [ bulk-filter, changes, split-units, split-clirr, split-dependencies ]
306320
name: conditional-required-check
307321
if: ${{ always() }} # Always run even if any "needs" jobs fail
308322
runs-on: ubuntu-22.04
@@ -313,6 +327,8 @@ jobs:
313327
- name: Success otherwise
314328
run: echo "Success!"
315329
windows:
330+
needs: bulk-filter
331+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
316332
runs-on: windows-latest
317333
steps:
318334
- name: Support longpaths
@@ -329,6 +345,8 @@ jobs:
329345
JOB_TYPE: test
330346
JOB_NAME: windows-units
331347
lint:
348+
needs: bulk-filter
349+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
332350
runs-on: ubuntu-latest
333351
steps:
334352
- uses: actions/checkout@v4
@@ -345,6 +363,8 @@ jobs:
345363
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
346364
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
347365
enforcer:
366+
needs: bulk-filter
367+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
348368
runs-on: ubuntu-latest
349369
steps:
350370
- name: Get current week within the year
@@ -364,6 +384,8 @@ jobs:
364384
- run: java -version
365385
- run: mvn -B -ntp enforcer:enforce@enforce -T 1C
366386
gapic-libraries-bom:
387+
needs: bulk-filter
388+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
367389
runs-on: ubuntu-latest
368390
steps:
369391
- uses: actions/checkout@v4
@@ -381,6 +403,8 @@ jobs:
381403
with:
382404
bom-path: gapic-libraries-bom/pom.xml
383405
generation-config-check:
406+
needs: bulk-filter
407+
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
384408
runs-on: ubuntu-latest
385409
steps:
386410
- uses: actions/checkout@v4
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright 2026 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+
name: Librarian generate diff check on pull requests
15+
on:
16+
pull_request:
17+
18+
jobs:
19+
library_generation:
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/setup-go@v5
26+
with:
27+
go-version: 'stable'
28+
- name: Install Librarian
29+
run: |
30+
V=$(go run github.com/googleapis/librarian/cmd/librarian@latest config get version)
31+
echo "Installing librarian version $V"
32+
go install github.com/googleapis/librarian/cmd/librarian@$V
33+
- name: Install protoc
34+
run: |
35+
set -e
36+
VERSION="33.2"
37+
curl -fsSL --retry 5 --retry-delay 15 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v$VERSION/protoc-$VERSION-linux-x86_64.zip"
38+
cd /usr/local
39+
sudo unzip -o /tmp/protoc.zip
40+
protoc --version
41+
- uses: actions/setup-java@v4
42+
with:
43+
java-version: "17"
44+
distribution: "temurin"
45+
cache: "maven"
46+
- name: Verify Java and Maven installation
47+
run: |
48+
java -version
49+
if ! command -v mvn &> /dev/null; then
50+
sudo apt-get update && sudo apt-get install -y maven
51+
fi
52+
mvn -version
53+
- uses: actions/setup-python@v5
54+
with:
55+
python-version: "3.12"
56+
cache: 'pip'
57+
- name: Run librarian install
58+
run: |
59+
librarian install
60+
echo "$HOME/java_tools/bin" >> $GITHUB_PATH
61+
- name: Run librarian generate
62+
env:
63+
PYTHONPATH: ${{ github.workspace }}/sdk-platform-java/hermetic_build/library_generation/owlbot
64+
run: |
65+
librarian generate --all
66+
- name: Check for generated code changes
67+
run: |
68+
git diff --exit-code

.github/workflows/update_librarian_googleapis.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
repository: googleapis/google-cloud-java
3434
path: google-cloud-java
3535
fetch-depth: 0
36+
persist-credentials: false
3637
- name: Check for Open PR
3738
env:
3839
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gapic-libraries-bom/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,13 @@
560560
<type>pom</type>
561561
<scope>import</scope>
562562
</dependency>
563+
<dependency>
564+
<groupId>com.google.cloud</groupId>
565+
<artifactId>google-cloud-developer-knowledge-bom</artifactId>
566+
<version>0.0.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-developer-knowledge:current} -->
567+
<type>pom</type>
568+
<scope>import</scope>
569+
</dependency>
563570
<dependency>
564571
<groupId>com.google.cloud</groupId>
565572
<artifactId>google-cloud-developerconnect-bom</artifactId>

0 commit comments

Comments
 (0)