Skip to content

Commit

Permalink
Merge branch 'main' into feature/dateStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
yirutang authored Jan 2, 2024
2 parents a3c03e4 + f150780 commit 429d9a8
Show file tree
Hide file tree
Showing 323 changed files with 22,527 additions and 6,881 deletions.
5 changes: 3 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,4 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:27b1b1884dce60460d7521b23c2a73376cba90c0ef3d9f0d32e4bdb786959cfd
digest: sha256:81f75d962cd28b7ad10740a643b8069b8fa0357cb495b782eef8560bb7a8fd65
# created: 2023-12-05T19:16:19.735195992Z
2 changes: 2 additions & 0 deletions .github/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ deep-remove-regex:

deep-preserve-regex:
- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java"
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ToProtoConverter.java"
- "/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BigQuerySchemaUtil.java"
- "/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/BigQuerySchemaUtilTest.java"
- "/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPoolTest.java"
Expand Down
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
# Disable version updates for Maven dependencies
# we use renovate-bot as well as shared-dependencies BOM to update maven dependencies.
ignore:
- dependency-name: "*"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
# Disable version updates for pip dependencies
# If a security vulnerability comes in, we will be notified about
# it via template in the synthtool repository.
ignore:
- dependency-name: "*"
4 changes: 4 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ branches:
handleGHRelease: true
releaseType: java-backport
branch: 2.25.x
- bumpMinorPreMajor: true
handleGHRelease: true
releaseType: java-backport
branch: 2.38.x
1 change: 1 addition & 0 deletions .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enabled: true
multiScmName: java-bigquerystorage
22 changes: 16 additions & 6 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ branchProtectionRules:
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- dependencies (17)
- lint
- clirr
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
- 'Kokoro - Test: Java GraalVM Native Image'
- 'Kokoro - Test: Java 17 GraalVM Native Image'
- javadoc
- pattern: java7
isAdminEnforced: true
requiredApprovingReviewCount: 1
Expand Down Expand Up @@ -79,8 +77,20 @@ branchProtectionRules:
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
- 'Kokoro - Test: Java GraalVM Native Image'
- 'Kokoro - Test: Java 17 GraalVM Native Image'
- pattern: 2.38.x
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- dependencies (17)
- lint
- clirr
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
permissionRules:
- team: yoshi-admins
permission: admin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/approve-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'release-please')
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
debug: true
Expand Down
58 changes: 46 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,46 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [8, 11, 17]
java: [11, 17]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v2
with:
distribution: zulu
distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
units-java8:
# Building using Java 17 and run the tests with Java 8 runtime
name: "units (8)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: zulu
- 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" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
- run: .kokoro/build.sh
env:
JOB_TYPE: test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v2
with:
distribution: zulu
distribution: temurin
java-version: 8
- run: java -version
- run: .kokoro/build.bat
Expand All @@ -39,22 +61,34 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 17]
java: [17]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v2
with:
distribution: zulu
distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: javadoc
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v2
with:
distribution: zulu
distribution: temurin
java-version: 11
- run: java -version
- run: .kokoro/build.sh
Expand All @@ -63,10 +97,10 @@ jobs:
clirr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v2
with:
distribution: zulu
distribution: temurin
java-version: 8
- run: java -version
- run: .kokoro/build.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
checkstyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v1
with:
java-version: 8
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target/
# Intellij
*.iml
.idea/
.vscode/

# python utilities
*.pyc
Expand Down
28 changes: 24 additions & 4 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ echo ${JOB_TYPE}

# attempt to install 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
mvn install -B -V \
mvn install -B -V -U \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
Expand All @@ -47,7 +47,8 @@ set +e

case ${JOB_TYPE} in
test)
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
RETURN_CODE=$?
;;
lint)
Expand All @@ -64,18 +65,21 @@ integration)
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dit.test=!ITBigQueryWrite*RetryTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-Dfailsafe.failIfNoSpecifiedTests=false \
-fae \
verify
RETURN_CODE=$?
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -PcustomNative -Penable-integration-tests test
RETURN_CODE=$?
;;
graalvm17)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -PcustomNative -Penable-integration-tests test
RETURN_CODE=$?
;;
samples)
Expand Down Expand Up @@ -111,6 +115,22 @@ clirr)
mvn -B -Denforcer.skip=true clirr:check
RETURN_CODE=$?
;;
retry_quota)
mvn -B ${INTEGRATION_TEST_ARGS} \
-Dit.test=ITBigQueryWriteQuotaRetryTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-Dfailsafe.failIfNoSpecifiedTests=false \
test
RETURN_CODE=$?
;;
retry_non_quota)
mvn -B ${INTEGRATION_TEST_ARGS} \
-Dit.test=ITBigQueryWriteNonQuotaRetryTest \
-Dsurefire.failIfNoSpecifiedTests=false \
-Dfailsafe.failIfNoSpecifiedTests=false \
test
RETURN_CODE=$?
;;
*)
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.3"
}

env_vars: {
Expand All @@ -30,4 +30,9 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "ENABLE_FLAKYBOT"
value: "true"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3"
}

env_vars: {
Expand Down Expand Up @@ -31,3 +31,8 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "ENABLE_FLAKYBOT"
value: "true"
}
1 change: 1 addition & 0 deletions .kokoro/nightly/integration.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

1 change: 1 addition & 0 deletions .kokoro/nightly/java11-integration.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

37 changes: 37 additions & 0 deletions .kokoro/nightly/retry_non_quota.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "bq-write-api-java-retry-test"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "bq-write-api-java-retry-test"
}

env_vars: {
key: "JOB_TYPE"
value: "retry_non_quota"
}

env_vars: {
key: "ENABLE_FLAKYBOT"
value: "true"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
Loading

0 comments on commit 429d9a8

Please sign in to comment.