diff --git a/.cloudbuild/jdbc_nightly.yaml b/.cloudbuild/jdbc_nightly.yaml new file mode 100644 index 000000000..bd3dc2ce5 --- /dev/null +++ b/.cloudbuild/jdbc_nightly.yaml @@ -0,0 +1,46 @@ +# 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. +options: + workerPool: 'projects/bigquery-devtools-drivers/locations/us-east1/workerPools/java-bigquery-jdbc-pool' + dynamic_substitutions: true + logging: CLOUD_LOGGING_ONLY + +timeout: 10000s +steps: +- name: 'gcr.io/cloud-devrel-public-resources/java11' + id: "IT Tests" + timeout: 10000s + entrypoint: 'bash' + args: ['.kokoro/build.sh'] + env: + - 'JOB_TYPE=jdbc-integration' + secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET'] +- name: 'gcr.io/cloud-devrel-public-resources/java11' + id: "IT Nightly Tests" + timeout: 10000s + entrypoint: 'bash' + args: ['.kokoro/build.sh'] + env: + - 'JOB_TYPE=jdbc-nightly-integration' + +availableSecrets: + secretManager: + - versionName: projects/$PROJECT_ID/secrets/jdbc-presubmit-sa-email/versions/latest + env: 'SA_EMAIL' + - versionName: projects/$PROJECT_ID/secrets/kms_resource_path/versions/latest + env: 'KMS_RESOURCE_PATH' + - versionName: projects/$PROJECT_ID/secrets/GoogleJDBCServiceAccountSecret/versions/latest + env: 'SA_SECRET' diff --git a/.cloudbuild/jdbc_presubmit.yaml b/.cloudbuild/jdbc_presubmit.yaml new file mode 100644 index 000000000..c5896967e --- /dev/null +++ b/.cloudbuild/jdbc_presubmit.yaml @@ -0,0 +1,41 @@ +# 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. +options: + workerPool: 'projects/bigquery-devtools-drivers/locations/us-east1/workerPools/java-bigquery-jdbc-pool' + dynamic_substitutions: true + logging: CLOUD_LOGGING_ONLY + +substitutions: + _JOB_TYPE: "jdbc-integration" + +timeout: 2000s +steps: +- name: 'gcr.io/cloud-devrel-public-resources/java11' + id: "IT Tests" + timeout: 2000s + entrypoint: 'bash' + args: ['.kokoro/build.sh'] + env: + - 'JOB_TYPE=${_JOB_TYPE}' + secretEnv: ['SA_EMAIL', 'KMS_RESOURCE_PATH', 'SA_SECRET'] +availableSecrets: + secretManager: + - versionName: projects/$PROJECT_ID/secrets/jdbc-presubmit-sa-email/versions/latest + env: 'SA_EMAIL' + - versionName: projects/$PROJECT_ID/secrets/kms_resource_path/versions/latest + env: 'KMS_RESOURCE_PATH' + - versionName: projects/$PROJECT_ID/secrets/GoogleJDBCServiceAccountSecret/versions/latest + env: 'SA_SECRET' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 084b07b25..9c1dfeeb3 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -61,6 +61,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -pl "!google-cloud-bigquery-jdbc" \ -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ @@ -70,9 +71,39 @@ integration) verify RETURN_CODE=$? ;; +jdbc-integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -pl "google-cloud-bigquery-jdbc" \ + -ntp \ + -Dtest=ITBigQueryJDBCTest \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +jdbc-nightly-integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -pl "google-cloud-bigquery-jdbc" \ + -ntp \ + -Dtest=ITNightlyBigQueryTest \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + -DargLine="-Xmx32g" \ + -e \ + verify + RETURN_CODE=$? + ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + mvn -B ${INTEGRATION_TEST_ARGS} \ + -pl "!google-cloud-bigquery-jdbc" \ + -ntp \ + -Pnative \ + test RETURN_CODE=$? ;; samples) diff --git a/google-cloud-bigquery-jdbc/pom.xml b/google-cloud-bigquery-jdbc/pom.xml index 8f2c9d7b4..74fc627e2 100644 --- a/google-cloud-bigquery-jdbc/pom.xml +++ b/google-cloud-bigquery-jdbc/pom.xml @@ -20,7 +20,7 @@ 4.0.0 com.google.cloud google-cloud-bigquery-jdbc - 0.1.0-SNAPSHOT + 0.1.0 jar BigQuery JDBC https://github.com/googleapis/java-bigquery-jdbc @@ -55,6 +55,18 @@ jacoco-maven-plugin 0.8.13 + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.*:* + org.apache.arrow:* + org.apache.httpcomponents.*:* + io.grpc:* + + + @@ -86,6 +98,97 @@ + + + + com.google.api + api-common + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api.grpc + proto-google-cloud-bigquerystorage-v1 + + + + com.google.auth + google-auth-library-oauth2-http + + + com.google.auth + google-auth-library-credentials + + + + com.google.cloud + google-cloud-core + + + com.google.cloud + google-cloud-core-http + + + + com.google.code.findbugs + jsr305 + + + com.google.code.gson + gson + + + + com.google.guava + guava + + + + com.google.protobuf + protobuf-java + + + com.google.http-client + google-http-client + + + + io.grpc + grpc-api + + + io.grpc + grpc-core + + + io.grpc + grpc-netty-shaded + + + + + org.apache.arrow + arrow-vector + + + org.apache.arrow + arrow-memory-core + + + org.apache.httpcomponents.client5 + httpclient5 + + + org.apache.httpcomponents.core5 + httpcore5 + + com.google.truth diff --git a/pom.xml b/pom.xml index cd13b2008..9821f1b68 100644 --- a/pom.xml +++ b/pom.xml @@ -153,6 +153,7 @@ google-cloud-bigquery google-cloud-bigquery-bom + google-cloud-bigquery-jdbc @@ -259,4 +260,3 @@ - diff --git a/versions.txt b/versions.txt index 54f6252b1..8f898d85e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,5 @@ # Format: # module:released-version:current-version -google-cloud-bigquery:2.57.2:2.57.2 \ No newline at end of file +google-cloud-bigquery:2.57.2:2.57.2 +google-cloud-bigquery-jdbc:0.1.0:0.1.0