From e2c65e119adc179f8db786cc99551422076e82c4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 23:02:44 +0000 Subject: [PATCH 01/27] chore(main): release 2.9.1-SNAPSHOT (#1851) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- benchmark/pom.xml | 2 +- google-cloud-bigquery/pom.xml | 4 ++-- pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 8472c7ebb2..bcdb43dbc6 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -6,7 +6,7 @@ google-cloud-bigquery-parent com.google.cloud - 2.9.0 + 2.9.1-SNAPSHOT diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml index 123f95281e..8c714685b7 100644 --- a/google-cloud-bigquery/pom.xml +++ b/google-cloud-bigquery/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquery - 2.9.0 + 2.9.1-SNAPSHOT jar BigQuery https://github.com/googleapis/java-bigquery @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigquery-parent - 2.9.0 + 2.9.1-SNAPSHOT google-cloud-bigquery diff --git a/pom.xml b/pom.xml index 4048b0b992..c458e286f9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquery-parent pom - 2.9.0 + 2.9.1-SNAPSHOT BigQuery Parent https://github.com/googleapis/java-bigquery @@ -84,7 +84,7 @@ com.google.cloud google-cloud-bigquery - 2.9.0 + 2.9.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 312c274576..65665a06f7 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-bigquery - 2.9.0 + 2.9.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 8dc052a16a..509577ad80 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-bigquery:2.9.0:2.9.0 \ No newline at end of file +google-cloud-bigquery:2.9.0:2.9.1-SNAPSHOT \ No newline at end of file From 627da62bd02314c673c345bd8eb87e973a805bc7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 00:33:58 +0100 Subject: [PATCH 02/27] deps: update dependency com.google.code.gson:gson to v2.9.0 (#1850) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c458e286f9..a77f773070 100644 --- a/pom.xml +++ b/pom.xml @@ -97,7 +97,7 @@ com.google.code.gson gson - 2.8.9 + 2.9.0 From ef91109821a702a6b55b4f1265e812578ca881d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 00:34:37 +0100 Subject: [PATCH 03/27] deps: update dependency com.google.cloud:google-cloud-storage to v2.4.2 (#1853) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:google-cloud-storage to v2.4.2 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 82c393b42f..2557f71171 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,13 @@ implementation 'com.google.cloud:google-cloud-bigquery' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-bigquery:2.8.0' +implementation 'com.google.cloud:google-cloud-bigquery:2.9.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.8.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "2.9.0" ``` ## Authentication diff --git a/pom.xml b/pom.xml index a77f773070..2665ea4288 100644 --- a/pom.xml +++ b/pom.xml @@ -135,7 +135,7 @@ com.google.cloud google-cloud-storage - 2.4.1 + 2.4.2 test From c979f550bf34d6bf29dadf5b5ed08b52dade3cd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 00:35:09 +0100 Subject: [PATCH 04/27] chore(deps): update dependency com.google.cloud:google-cloud-bigqueryconnection to v2.1.10 (#1854) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-bigqueryconnection to v2.1.10 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4b3ba9df96..42371f6ed4 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -69,7 +69,7 @@ com.google.cloud google-cloud-bigqueryconnection - 2.1.9 + 2.1.10 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 65665a06f7..35ab225ef4 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -67,7 +67,7 @@ com.google.cloud google-cloud-bigqueryconnection - 2.1.9 + 2.1.10 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8a7caea9d9..3e913a8346 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -85,7 +85,7 @@ com.google.cloud google-cloud-bigqueryconnection - 2.1.9 + 2.1.10 test From 376738d5fb7253de6e2e9d574aa99e9d7a9e67ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 00:35:37 +0100 Subject: [PATCH 05/27] deps: update dependency com.google.cloud:native-image-support to v0.12.4 (#1855) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.google.cloud:native-image-support to v0.12.4 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 6e3fced6bd..4eeaa7c9a5 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-support - 0.12.3 + 0.12.4 org.junit.vintage From b3b5398d6ba5473e0a4a2f30cbb76510e0eb7e62 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 00:35:52 +0100 Subject: [PATCH 06/27] chore(deps): update dependency com.google.cloud:google-cloud-bigquery to v2.9.0 (#1856) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-bigquery to v2.9.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 2 +- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2557f71171..d3f20914ee 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigquery - 2.8.0 + 2.9.0 ``` diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 42371f6ed4..115af2736a 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -45,7 +45,7 @@ com.google.cloud google-cloud-bigquery - 2.8.0 + 2.9.0 From 3e82960f75ced489f9f0e72fe45165ab866f1d8b Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Mon, 14 Feb 2022 11:00:32 -0500 Subject: [PATCH 07/27] fix(java): add additional configurations to fix native image tests (#1859) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(java): add configurations to fix native image tests * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../cloud/bigquery/it/ITBigQueryTest.java | 7 +++--- .../META-INF/native-image/reflect-config.json | 23 +++++++++++++++++++ .../native-image/resource-config.json | 3 +++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 google-cloud-bigquery/src/test/resources/META-INF/native-image/reflect-config.json create mode 100644 google-cloud-bigquery/src/test/resources/META-INF/native-image/resource-config.json diff --git a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java index 282bef986c..9cab253a21 100644 --- a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java +++ b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java @@ -125,10 +125,10 @@ import com.google.common.io.BaseEncoding; import com.google.gson.JsonObject; import java.io.IOException; +import java.io.InputStream; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.nio.file.FileSystems; import java.time.Instant; import java.time.Period; import java.util.ArrayList; @@ -472,9 +472,10 @@ public static void beforeClass() throws InterruptedException, IOException { .setContentType("application/json") .build(), JSON_CONTENT_SIMPLE.getBytes(StandardCharsets.UTF_8)); + InputStream stream = + ITBigQueryTest.class.getClassLoader().getResourceAsStream("QueryTestData.csv"); storage.createFrom( - BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(), - FileSystems.getDefault().getPath("src/test/resources", "QueryTestData.csv")); + BlobInfo.newBuilder(BUCKET, LOAD_FILE_LARGE).setContentType("text/plain").build(), stream); DatasetInfo info = DatasetInfo.newBuilder(DATASET).setDescription(DESCRIPTION).setLabels(LABELS).build(); bigquery.create(info); diff --git a/google-cloud-bigquery/src/test/resources/META-INF/native-image/reflect-config.json b/google-cloud-bigquery/src/test/resources/META-INF/native-image/reflect-config.json new file mode 100644 index 0000000000..b999445994 --- /dev/null +++ b/google-cloud-bigquery/src/test/resources/META-INF/native-image/reflect-config.json @@ -0,0 +1,23 @@ +[ + { + "name":"java.lang.Object", + "methods":[{"name":"","parameterTypes":[] }] + }, + { + "name":"com.google.api.client.googleapis.json.GoogleJsonError", + "methods":[ + {"name":"","parameterTypes":[] }] + }, + { + "name":"com.google.api.client.googleapis.json.GoogleJsonError$Details", + "methods":[{"name":"","parameterTypes":[] }] + }, + { + "name":"com.google.api.client.googleapis.json.GoogleJsonError$ErrorInfo", + "methods":[{"name":"","parameterTypes":[]}] + }, + { + "name":"java.util.HashMap", + "methods":[{"name":"","parameterTypes":[] }] + } +] \ No newline at end of file diff --git a/google-cloud-bigquery/src/test/resources/META-INF/native-image/resource-config.json b/google-cloud-bigquery/src/test/resources/META-INF/native-image/resource-config.json new file mode 100644 index 0000000000..e00ed1f1c5 --- /dev/null +++ b/google-cloud-bigquery/src/test/resources/META-INF/native-image/resource-config.json @@ -0,0 +1,3 @@ +{ + "resources":[{"pattern": ".*.csv"}] +} \ No newline at end of file From 5598477db7a0eeddd72795ddb9257ade539597b2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 17:00:55 +0100 Subject: [PATCH 08/27] build(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.10.0 (#1858) --- benchmark/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index bcdb43dbc6..92f5795258 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -37,7 +37,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.9.0 + 3.10.0 org.apache.maven.plugins From b31b44c170b1bc948daaae1a9ae6c469370f986c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 19:49:06 +0100 Subject: [PATCH 09/27] deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 (#1860) --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 4eeaa7c9a5..7f552bafcf 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -104,7 +104,7 @@ org.graalvm.buildtools junit-platform-native - 0.9.9 + 0.9.10 test From ae05dfed0e670826f7674dc092b91bd5f634bf97 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 19:49:37 +0100 Subject: [PATCH 10/27] deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 (#1861) --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 7f552bafcf..040ed2f62d 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -126,7 +126,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.9 + 0.9.10 true com.example.bigquery.NativeImageBigquerySample From 9359e0cd4c13bc9f391310613ebf90015973f39b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Feb 2022 16:51:36 +0100 Subject: [PATCH 11/27] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.10 (#1862) --- benchmark/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 92f5795258..d7acfdca9e 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -83,7 +83,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.10 true diff --git a/samples/pom.xml b/samples/pom.xml index a02b0b6c46..1fd03cadb5 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -63,7 +63,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.10 true diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 3e913a8346..aeb6f0648f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.10 true From c37f800941f70d49e3316bd5f4299f3fce654f64 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 16 Feb 2022 17:32:57 +0100 Subject: [PATCH 12/27] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.11 (#1864) --- benchmark/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index d7acfdca9e..370b42876e 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -83,7 +83,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true diff --git a/samples/pom.xml b/samples/pom.xml index 1fd03cadb5..5614ef8158 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -63,7 +63,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index aeb6f0648f..798d431117 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true From cf9c36ff641dfcb889ee2d2c7da79e4ef95482d3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Feb 2022 01:03:45 +0100 Subject: [PATCH 13/27] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.12 (#1867) --- benchmark/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index 370b42876e..bbb7694c28 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -83,7 +83,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.12 true diff --git a/samples/pom.xml b/samples/pom.xml index 5614ef8158..4e280e644d 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -63,7 +63,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.12 true diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 798d431117..cebeff8a16 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.12 true From 7fa7480774f88bae2ffc2f03ab447381b9b3bf4a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 25 Feb 2022 16:18:25 +0100 Subject: [PATCH 14/27] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.2.2 (#1869) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2665ea4288..c90c999a46 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.1 + 3.2.2 From bd6dd2a7d8be6df240260d280fa35aa047bbb420 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 22:06:43 +0000 Subject: [PATCH 15/27] ci: pull request template includes sample format (#1357) (#1871) Source-Link: https://github.com/googleapis/synthtool/commit/e122cb03ea37652946651346736d99b9dcc4311f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 --- .github/.OwlBot.lock.yaml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c43..9351fdfb9a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0eddd3d4fc..51efda31d4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). From 698306e480b5f3a180c62b6d9ae0d919e05154d3 Mon Sep 17 00:00:00 2001 From: Prashant Mishra Date: Tue, 1 Mar 2022 04:52:30 +0530 Subject: [PATCH 16/27] docs(sample): Table exists sample fix (#1868) Added `null` check in the sample and modified the test case to test for "Table not found" --- .../src/main/java/com/example/bigquery/TableExists.java | 5 ++++- .../src/test/java/com/example/bigquery/TableExistsIT.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/snippets/src/main/java/com/example/bigquery/TableExists.java b/samples/snippets/src/main/java/com/example/bigquery/TableExists.java index 0775c2548b..0447fe3de1 100644 --- a/samples/snippets/src/main/java/com/example/bigquery/TableExists.java +++ b/samples/snippets/src/main/java/com/example/bigquery/TableExists.java @@ -40,7 +40,10 @@ public static void tableExists(String datasetName, String tableName) { BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService(); Table table = bigquery.getTable(TableId.of(datasetName, tableName)); - if (table.exists()) { + if (table != null + && table + .exists()) { // table will be null if it is not found and setThrowNotFound is not set + // to `true` System.out.println("Table already exist"); } else { System.out.println("Table not found"); diff --git a/samples/snippets/src/test/java/com/example/bigquery/TableExistsIT.java b/samples/snippets/src/test/java/com/example/bigquery/TableExistsIT.java index 4ff04e4efa..4573648a61 100644 --- a/samples/snippets/src/test/java/com/example/bigquery/TableExistsIT.java +++ b/samples/snippets/src/test/java/com/example/bigquery/TableExistsIT.java @@ -61,7 +61,6 @@ public void setUp() { System.setOut(out); // create a temporary table tableName = "MY_TABLE_NAME_TEST_" + UUID.randomUUID().toString().substring(0, 8); - CreateTable.createTable(BIGQUERY_DATASET_NAME, tableName, Schema.of()); } @After @@ -76,6 +75,9 @@ public void tearDown() { @Test public void testTableExists() { + TableExists.tableExists(BIGQUERY_DATASET_NAME, tableName); + assertThat(bout.toString()).contains("Table not found"); + CreateTable.createTable(BIGQUERY_DATASET_NAME, tableName, Schema.of()); TableExists.tableExists(BIGQUERY_DATASET_NAME, tableName); assertThat(bout.toString()).contains("Table already exist"); } From e67cf65bc044d07ba386f98cf67d2e16144255d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 01:23:10 +0100 Subject: [PATCH 17/27] deps: update dependency com.google.apis:google-api-services-bigquery to v2-rev20220220-1.32.1 (#1872) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c90c999a46..c1712c9aa8 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ UTF-8 github google-cloud-bigquery-parent - v2-rev20220123-1.32.1 + v2-rev20220220-1.32.1 2.7.0 From a4deb16ed54edf51608f27b47b0846fb23c553fd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 03:48:20 +0100 Subject: [PATCH 18/27] deps: update dependency com.google.cloud:google-cloud-storage to v2.4.4 (#1873) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-storage](https://togithub.com/googleapis/java-storage) | `2.4.2` -> `2.4.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.4/compatibility-slim/2.4.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.4/confidence-slim/2.4.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-storage ### [`v2.4.4`](https://togithub.com/googleapis/java-storage/blob/HEAD/CHANGELOG.md#​244-httpsgithubcomgoogleapisjava-storagecomparev243v244-2022-02-28) [Compare Source](https://togithub.com/googleapis/java-storage/compare/v2.4.3...v2.4.4) ### [`v2.4.3`](https://togithub.com/googleapis/java-storage/blob/HEAD/CHANGELOG.md#​243-httpsgithubcomgoogleapisjava-storagecomparev242v243-2022-02-25) [Compare Source](https://togithub.com/googleapis/java-storage/compare/v2.4.2...v2.4.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquery). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1712c9aa8..4f6bd87d17 100644 --- a/pom.xml +++ b/pom.xml @@ -135,7 +135,7 @@ com.google.cloud google-cloud-storage - 2.4.2 + 2.4.4 test From c68c49a26abdcce8468b5e848cf39c458aba4774 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 18:52:17 +0100 Subject: [PATCH 19/27] deps: update dependency com.google.cloud:native-image-support to v0.12.5 (#1874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.12.4` -> `0.12.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.5/compatibility-slim/0.12.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.5/confidence-slim/0.12.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquery). --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 040ed2f62d..b8fc2ecf32 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-support - 0.12.4 + 0.12.5 org.junit.vintage From 04a97713ea791b1b48baa8f197e7e9030ac4736e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 22:36:18 +0000 Subject: [PATCH 20/27] chore: update github actions (#1361) (#1875) * chore: update github actions * chore: update Source-Link: https://github.com/googleapis/synthtool/commit/1622741e6877d4b335b137ac7e07f7f32d4e5af7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- .github/workflows/ci.yaml | 20 ++++++++++---------- .github/workflows/samples.yaml | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9351fdfb9a..53941094cf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 + digest: sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 1bb1823276..f5fc7d5169 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18e23230d9..7a106d007e 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b5e56aaac..83ef7f9c2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -39,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 @@ -54,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -64,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 11 @@ -76,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index d5d964df15..de737e92a8 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,8 +20,8 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: java-version: 8 - name: Run checkstyle From a16985f79f5e09ee6567caf3eb502d7e88103f97 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 18:05:34 +0100 Subject: [PATCH 21/27] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 (#1876) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f6bd87d17..36b9ebc660 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ github google-cloud-bigquery-parent v2-rev20220220-1.32.1 - 2.7.0 + 2.8.0
From 3749921d6d120ffd79941c9ede64822cea03f1cd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 18:05:52 +0100 Subject: [PATCH 22/27] deps: update dependency com.google.cloud:native-image-support to v0.12.6 (#1878) --- samples/native-image-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index b8fc2ecf32..defbf2acaa 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-support - 0.12.5 + 0.12.6 org.junit.vintage From cbc9208e105ed9b085a4d239b02f43fa82f03a71 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 18:08:36 +0100 Subject: [PATCH 23/27] chore(deps): update dependency com.google.cloud:libraries-bom to v24.4.0 (#1880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v24.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 4 ++-- samples/native-image-sample/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d3f20914ee..b5057ae0eb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ See https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import @@ -52,7 +52,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:24.3.0') +implementation platform('com.google.cloud:libraries-bom:24.4.0') implementation 'com.google.cloud:google-cloud-bigquery' ``` diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index defbf2acaa..75cad8958d 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -39,7 +39,7 @@ com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index cebeff8a16..4c0b2d95f2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -47,7 +47,7 @@ com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import From 62ddb6133115626172458327cd5c104cc6fc7310 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Wed, 2 Mar 2022 12:10:24 -0500 Subject: [PATCH 24/27] Revert "chore: update github actions (#1361)" (#1881) Due to the fact that it is causing checkstyle failure: https://github.com/googleapis/java-bigquery/pull/1875#issuecomment-1057147095 --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- .github/workflows/ci.yaml | 20 ++++++++++---------- .github/workflows/samples.yaml | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 53941094cf..9351fdfb9a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a + digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index f5fc7d5169..1bb1823276 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,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@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 7a106d007e..18e23230d9 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83ef7f9c2c..6b5e56aaac 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: distribution: zulu java-version: ${{matrix.java}} @@ -39,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: distribution: zulu java-version: 8 @@ -54,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: distribution: zulu java-version: ${{matrix.java}} @@ -64,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: distribution: zulu java-version: 11 @@ -76,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 with: distribution: zulu java-version: 8 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index de737e92a8..d5d964df15 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,8 +20,8 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 with: java-version: 8 - name: Run checkstyle From 1bc9188e4f6679b3079d0da153ff4d8af62037a5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 20:54:23 +0000 Subject: [PATCH 25/27] chore: fix license header in build.bat (#1363) (#1883) * chore: fix license header in build.bat * chore: add disctribution field for setup-java action Source-Link: https://github.com/googleapis/synthtool/commit/4fea5f40a9075f3ba205ede0b453010cf080e194 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- .github/workflows/ci.yaml | 20 +++++++++--------- .github/workflows/samples.yaml | 5 +++-- .kokoro/build.bat | 30 +++++++++++++-------------- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9351fdfb9a..3473042c08 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 + digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 1bb1823276..f5fc7d5169 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18e23230d9..7a106d007e 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b5e56aaac..83ef7f9c2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -39,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 @@ -54,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -64,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 11 @@ -76,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index d5d964df15..912ed8b2b0 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,9 +20,10 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: + distribution: zulu java-version: 8 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check diff --git a/.kokoro/build.bat b/.kokoro/build.bat index cc602c9eba..067cf4a4c4 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,18 +1,18 @@ +:: Copyright 2022 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. :: See documentation in type-shell-output.bat -# Copyright 2022 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. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh From fd0753338e15965347683345b0e51838baf5d9f6 Mon Sep 17 00:00:00 2001 From: Franklin Whaite <70151215+franklinWhaite@users.noreply.github.com> Date: Thu, 3 Mar 2022 12:16:27 -0500 Subject: [PATCH 26/27] Fix: adjusting retry logic to avoid retrying successful job creation (#1879) https://github.com/googleapis/java-bigquery/pull/1744 introduced retrying 200 responses, but the regex that we are using is too broad: [".*exceed.*rate.limit."] and in some cases it may catch a valid response. The issue is that the current logic is scanning the whole response. In this PR the retry logic is modified to specifically check the error message from the response. For this purpose parsing logic was developed to extract error messages from responses. This logic is specifically designed for the [jobs.insert method response](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert#response-body) (only case observed so far where a response with status code 200 might also return an error message). --- .../bigquery/BigQueryRetryAlgorithm.java | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryRetryAlgorithm.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryRetryAlgorithm.java index af472430fc..0429b7f005 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryRetryAlgorithm.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryRetryAlgorithm.java @@ -25,6 +25,8 @@ import com.google.api.gax.retrying.TimedAttemptSettings; import com.google.api.gax.retrying.TimedRetryAlgorithm; import com.google.api.gax.retrying.TimedRetryAlgorithmWithContext; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import java.util.Iterator; import java.util.UUID; import java.util.concurrent.CancellationException; @@ -107,9 +109,10 @@ private boolean shouldRetryBasedOnBigQueryRetryConfig( /* In some cases error messages may come without an exception e.g. status code 200 with a rate limit exceeded for job create - in these cases there is now previousThrowable so we need to check previousResponse + in these cases there is no previousThrowable so we need + to check for error messages in previousResponse */ - errorDesc = previousResponse.toString(); + errorDesc = getErrorDescFromResponse(previousResponse); } if (errorDesc != null) { @@ -212,4 +215,28 @@ private TimedAttemptSettings createNextAttemptBasedOnTiming( } return getTimedAlgorithm().createNextAttempt(previousSettings); } + + private String getErrorDescFromResponse(ResponseT previousResponse) { + /* + error messages may come without an exception and must be extracted from response + following logic based on response body of jobs.insert method, so far the only + known case where a response with status code 200 may contain an error message + */ + try { + JsonObject responseJson = + JsonParser.parseString(previousResponse.toString()).getAsJsonObject(); + if (responseJson.has("status") && responseJson.getAsJsonObject("status").has("errorResult")) { + return responseJson + .getAsJsonObject("status") + .getAsJsonObject("errorResult") + .get("message") + .toString(); + } else { + return null; + } + } catch (Exception e) { + // exceptions here implies no error message present in response, returning null + return null; + } + } } From 7176c30e2c5c63b1b2875994e0fce9a8a3a68122 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:50:27 +0000 Subject: [PATCH 27/27] chore(main): release 2.9.1 (#1857) :robot: I have created a release *beep* *boop* --- ### [2.9.1](https://github.com/googleapis/java-bigquery/compare/v2.9.0...v2.9.1) (2022-03-03) ### Bug Fixes * adjusting retry logic to avoid retrying successful job creation ([#1879](https://github.com/googleapis/java-bigquery/issues/1879)) ([fd07533](https://github.com/googleapis/java-bigquery/commit/fd0753338e15965347683345b0e51838baf5d9f6)) * **java:** add additional configurations to fix native image tests ([#1859](https://github.com/googleapis/java-bigquery/issues/1859)) ([3e82960](https://github.com/googleapis/java-bigquery/commit/3e82960f75ced489f9f0e72fe45165ab866f1d8b)) ### Documentation * **sample:** Table exists sample fix ([#1868](https://github.com/googleapis/java-bigquery/issues/1868)) ([698306e](https://github.com/googleapis/java-bigquery/commit/698306e480b5f3a180c62b6d9ae0d919e05154d3)) ### Dependencies * update dependency com.google.apis:google-api-services-bigquery to v2-rev20220220-1.32.1 ([#1872](https://github.com/googleapis/java-bigquery/issues/1872)) ([e67cf65](https://github.com/googleapis/java-bigquery/commit/e67cf65bc044d07ba386f98cf67d2e16144255d0)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#1876](https://github.com/googleapis/java-bigquery/issues/1876)) ([a16985f](https://github.com/googleapis/java-bigquery/commit/a16985f79f5e09ee6567caf3eb502d7e88103f97)) * update dependency com.google.cloud:google-cloud-storage to v2.4.2 ([#1853](https://github.com/googleapis/java-bigquery/issues/1853)) ([ef91109](https://github.com/googleapis/java-bigquery/commit/ef91109821a702a6b55b4f1265e812578ca881d8)) * update dependency com.google.cloud:google-cloud-storage to v2.4.4 ([#1873](https://github.com/googleapis/java-bigquery/issues/1873)) ([a4deb16](https://github.com/googleapis/java-bigquery/commit/a4deb16ed54edf51608f27b47b0846fb23c553fd)) * update dependency com.google.cloud:native-image-support to v0.12.4 ([#1855](https://github.com/googleapis/java-bigquery/issues/1855)) ([376738d](https://github.com/googleapis/java-bigquery/commit/376738d5fb7253de6e2e9d574aa99e9d7a9e67ad)) * update dependency com.google.cloud:native-image-support to v0.12.5 ([#1874](https://github.com/googleapis/java-bigquery/issues/1874)) ([c68c49a](https://github.com/googleapis/java-bigquery/commit/c68c49a26abdcce8468b5e848cf39c458aba4774)) * update dependency com.google.cloud:native-image-support to v0.12.6 ([#1878](https://github.com/googleapis/java-bigquery/issues/1878)) ([3749921](https://github.com/googleapis/java-bigquery/commit/3749921d6d120ffd79941c9ede64822cea03f1cd)) * update dependency com.google.code.gson:gson to v2.9.0 ([#1850](https://github.com/googleapis/java-bigquery/issues/1850)) ([627da62](https://github.com/googleapis/java-bigquery/commit/627da62bd02314c673c345bd8eb87e973a805bc7)) * update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 ([#1860](https://github.com/googleapis/java-bigquery/issues/1860)) ([b31b44c](https://github.com/googleapis/java-bigquery/commit/b31b44c170b1bc948daaae1a9ae6c469370f986c)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 ([#1861](https://github.com/googleapis/java-bigquery/issues/1861)) ([ae05dfe](https://github.com/googleapis/java-bigquery/commit/ae05dfed0e670826f7674dc092b91bd5f634bf97)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ benchmark/pom.xml | 2 +- google-cloud-bigquery/pom.xml | 4 ++-- pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 2 +- 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9adc2177..8af93a8aac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +### [2.9.1](https://github.com/googleapis/java-bigquery/compare/v2.9.0...v2.9.1) (2022-03-03) + + +### Bug Fixes + +* adjusting retry logic to avoid retrying successful job creation ([#1879](https://github.com/googleapis/java-bigquery/issues/1879)) ([fd07533](https://github.com/googleapis/java-bigquery/commit/fd0753338e15965347683345b0e51838baf5d9f6)) +* **java:** add additional configurations to fix native image tests ([#1859](https://github.com/googleapis/java-bigquery/issues/1859)) ([3e82960](https://github.com/googleapis/java-bigquery/commit/3e82960f75ced489f9f0e72fe45165ab866f1d8b)) + + +### Documentation + +* **sample:** Table exists sample fix ([#1868](https://github.com/googleapis/java-bigquery/issues/1868)) ([698306e](https://github.com/googleapis/java-bigquery/commit/698306e480b5f3a180c62b6d9ae0d919e05154d3)) + + +### Dependencies + +* update dependency com.google.apis:google-api-services-bigquery to v2-rev20220220-1.32.1 ([#1872](https://github.com/googleapis/java-bigquery/issues/1872)) ([e67cf65](https://github.com/googleapis/java-bigquery/commit/e67cf65bc044d07ba386f98cf67d2e16144255d0)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#1876](https://github.com/googleapis/java-bigquery/issues/1876)) ([a16985f](https://github.com/googleapis/java-bigquery/commit/a16985f79f5e09ee6567caf3eb502d7e88103f97)) +* update dependency com.google.cloud:google-cloud-storage to v2.4.2 ([#1853](https://github.com/googleapis/java-bigquery/issues/1853)) ([ef91109](https://github.com/googleapis/java-bigquery/commit/ef91109821a702a6b55b4f1265e812578ca881d8)) +* update dependency com.google.cloud:google-cloud-storage to v2.4.4 ([#1873](https://github.com/googleapis/java-bigquery/issues/1873)) ([a4deb16](https://github.com/googleapis/java-bigquery/commit/a4deb16ed54edf51608f27b47b0846fb23c553fd)) +* update dependency com.google.cloud:native-image-support to v0.12.4 ([#1855](https://github.com/googleapis/java-bigquery/issues/1855)) ([376738d](https://github.com/googleapis/java-bigquery/commit/376738d5fb7253de6e2e9d574aa99e9d7a9e67ad)) +* update dependency com.google.cloud:native-image-support to v0.12.5 ([#1874](https://github.com/googleapis/java-bigquery/issues/1874)) ([c68c49a](https://github.com/googleapis/java-bigquery/commit/c68c49a26abdcce8468b5e848cf39c458aba4774)) +* update dependency com.google.cloud:native-image-support to v0.12.6 ([#1878](https://github.com/googleapis/java-bigquery/issues/1878)) ([3749921](https://github.com/googleapis/java-bigquery/commit/3749921d6d120ffd79941c9ede64822cea03f1cd)) +* update dependency com.google.code.gson:gson to v2.9.0 ([#1850](https://github.com/googleapis/java-bigquery/issues/1850)) ([627da62](https://github.com/googleapis/java-bigquery/commit/627da62bd02314c673c345bd8eb87e973a805bc7)) +* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 ([#1860](https://github.com/googleapis/java-bigquery/issues/1860)) ([b31b44c](https://github.com/googleapis/java-bigquery/commit/b31b44c170b1bc948daaae1a9ae6c469370f986c)) +* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 ([#1861](https://github.com/googleapis/java-bigquery/issues/1861)) ([ae05dfe](https://github.com/googleapis/java-bigquery/commit/ae05dfed0e670826f7674dc092b91bd5f634bf97)) + ## [2.9.0](https://github.com/googleapis/java-bigquery/compare/v2.8.0...v2.9.0) (2022-02-11) diff --git a/benchmark/pom.xml b/benchmark/pom.xml index bbb7694c28..336b7f398f 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -6,7 +6,7 @@ google-cloud-bigquery-parent com.google.cloud - 2.9.1-SNAPSHOT + 2.9.1 diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml index 8c714685b7..402ae4e297 100644 --- a/google-cloud-bigquery/pom.xml +++ b/google-cloud-bigquery/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquery - 2.9.1-SNAPSHOT + 2.9.1 jar BigQuery https://github.com/googleapis/java-bigquery @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigquery-parent - 2.9.1-SNAPSHOT + 2.9.1 google-cloud-bigquery diff --git a/pom.xml b/pom.xml index 36b9ebc660..bf73724afe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquery-parent pom - 2.9.1-SNAPSHOT + 2.9.1 BigQuery Parent https://github.com/googleapis/java-bigquery @@ -84,7 +84,7 @@ com.google.cloud google-cloud-bigquery - 2.9.1-SNAPSHOT + 2.9.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 35ab225ef4..c2e0ebb5d0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -44,7 +44,7 @@ com.google.cloud google-cloud-bigquery - 2.9.1-SNAPSHOT + 2.9.1 diff --git a/versions.txt b/versions.txt index 509577ad80..bb05ed50ce 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-bigquery:2.9.0:2.9.1-SNAPSHOT \ No newline at end of file +google-cloud-bigquery:2.9.1:2.9.1 \ No newline at end of file