Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
with:
filters: |
src:
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
- '!(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'
- '!(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'
- 'pom.xml'
ci:
- '.github/workflows/ci.yaml'
Expand Down
158 changes: 158 additions & 0 deletions .github/workflows/java-bigquery-jdbc-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Github action job to test core java library features on
# downstream client libraries before they are released.
on:
push:
branches:
- main
pull_request:
name: java-bigquery-jdbc ci
env:
BUILD_SUBDIR: java-bigquery-jdbc
jobs:
filter:
runs-on: ubuntu-latest
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
library:
Comment thread
logachev marked this conversation as resolved.
- 'java-bigquery/**'
- 'java-bigquery-jdbc/**'
- 'java-bigquerystorage/**'
- '.github/workflows/java-bigquery-jdbc-ci.yaml'
- 'google-auth-library-java/**/*.java'
- 'google-auth-library-java/**/pom.xml'
- 'sdk-platform-java/**/*.java'
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
units:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [11, 17, 21, 25]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
units-java8:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
# Building using Java 17 and run the tests with Java 8 runtime
name: "units (8)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- run: .kokoro/build.sh
env:
JOB_TYPE: test
windows:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: windows-latest
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
dependencies:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: .kokoro/dependencies.sh
javadoc:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: javadoc
lint:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
required:
needs: [ units, units-java8, windows, dependencies, javadoc, lint ]
name: conditional-required-check
if: ${{ always() }} # Always run even if any "needs" jobs fail
runs-on: ubuntu-22.04
steps:
- name: Fail if any previous failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Success otherwise
run: echo "Success!"
1 change: 1 addition & 0 deletions .kokoro/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ excluded_modules=(
'java-vertexai'
'java-logging'
'java-bigquery'
'java-bigquery-jdbc'
'java-bigquerystorage'
'java-datastore'
'java-logging-logback'
Expand Down
5 changes: 1 addition & 4 deletions .kokoro/presubmit/bigquery-graalvm-native-presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,4 @@ env_vars: {
value: "java-bigquery"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "-pl !google-cloud-bigquery-jdbc"
}

5 changes: 1 addition & 4 deletions .kokoro/presubmit/bigquery-integration.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,4 @@ env_vars: {
value: "java-bigquery"
}

env_vars: {
key: "INTEGRATION_TEST_ARGS"
value: "-pl !google-cloud-bigquery-jdbc"
}

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
id: "IT Tests"
timeout: 10000s
entrypoint: 'bash'
args: ['java-bigquery/.cloudbuild/scripts/jdbc-nightly.sh']
args: ['java-bigquery-jdbc/.cloudbuild/scripts/jdbc-nightly.sh']
secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET']

availableSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
id: "IT Tests"
timeout: 2000s
entrypoint: 'bash'
args: ['java-bigquery/.cloudbuild/scripts/jdbc-presubmit.sh']
args: ['java-bigquery-jdbc/.cloudbuild/scripts/jdbc-presubmit.sh']
secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET']
availableSecrets:
secretManager:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_FOLDER=$(git rev-parse --show-toplevel)

cd ${ROOT_FOLDER}
source .kokoro/common.sh
install_modules java-bigquery
install_modules java-bigquery-jdbc

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
cd ${ROOT_FOLDER}/java-bigquery-jdbc
make integration-test test=ITNightlyTests
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT_FOLDER=$(git rev-parse --show-toplevel)

cd ${ROOT_FOLDER}
source .kokoro/common.sh
install_modules java-bigquery
install_modules java-bigquery-jdbc

cd ${ROOT_FOLDER}/java-bigquery/google-cloud-bigquery-jdbc
cd ${ROOT_FOLDER}/java-bigquery-jdbc
make integration-test test=ITPresubmitTests
15 changes: 15 additions & 0 deletions java-bigquery-jdbc/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"api_shortname": "bigquery-jdbc",
"name_pretty": "BigQuery JDBC",
"product_documentation": "https://cloud.google.com/bigquery",
"client_documentation": "https://docs.cloud.google.com/bigquery/docs/jdbc-for-bigquery",
"release_level": "stable",
"language": "java",
"min_java_version": 8,
"repo": "googleapis/google-cloud-java",
"repo_short": "google-cloud-java",
"distribution_name": "com.google.cloud:google-cloud-bigquery-jdbc",
"library_type": "OTHER",
"codeowner_team": "@googleapis/bigquery-developer-tools-team",
"recommended_package": "com.google.cloud.bigquery.jdbc"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ ifndef GOOGLE_APPLICATION_CREDENTIALS
endif

install:
cd "$(PWD)/../.." && \
cd "$(PWD)/.." && \
source ".kokoro/common.sh" && \
install_modules java-bigquery
install_modules java-bigquery-jdbc

clean:
mvn clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,16 @@

<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery-parent</artifactId>
<version>2.67.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery:current} -->
<artifactId>google-cloud-jar-parent</artifactId>
<version>1.87.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-java:current} -->
<relativePath>../google-cloud-jar-parent/pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>2.67.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigquery:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -358,6 +361,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.11.0</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid hardcoding dependency versions in individual module POMs to prevent version drift and simplify maintenance. Consider using a property defined in the parent POM or managing this dependency in a shared BOM if it's used across multiple modules in the monorepo.

<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -406,6 +410,14 @@
</build>
</profile>

<!-- skip tests if bulkTests profile is enabled (when testing the rest of the monorepo) -->
<profile>
<id>bulkTests</id>
<properties>
<skipTests>true</skipTests>
</properties>
</profile>

<!-- Profile used inside docker -->
<profile>
<id>docker</id>
Expand Down
1 change: 0 additions & 1 deletion java-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
<modules>
<module>google-cloud-bigquery</module>
<module>google-cloud-bigquery-bom</module>
<module>google-cloud-bigquery-jdbc</module>
</modules>

<build>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<module>java-biglake</module>
<module>java-bigquery</module>
<module>java-bigquery-data-exchange</module>
<module>java-bigquery-jdbc</module>
<module>java-bigqueryconnection</module>
<module>java-bigquerydatapolicy</module>
<module>java-bigquerydatatransfer</module>
Expand Down
Loading