From 7837e4ef3cfd4248836767ce002a92bb9a25d8e4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2020 08:08:04 +0000 Subject: [PATCH 01/31] chore: release 0.4.1-SNAPSHOT (#150) :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). --- google-cloud-bigqueryconnection-bom/pom.xml | 12 ++++++------ google-cloud-bigqueryconnection/pom.xml | 4 ++-- grpc-google-cloud-bigqueryconnection-v1/pom.xml | 4 ++-- grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-bigqueryconnection-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/google-cloud-bigqueryconnection-bom/pom.xml b/google-cloud-bigqueryconnection-bom/pom.xml index 9b37ad76..cd6fb474 100644 --- a/google-cloud-bigqueryconnection-bom/pom.xml +++ b/google-cloud-bigqueryconnection-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection-bom - 0.4.0 + 0.4.1-SNAPSHOT pom com.google.cloud @@ -64,27 +64,27 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/google-cloud-bigqueryconnection/pom.xml b/google-cloud-bigqueryconnection/pom.xml index 3c44b840..2a0f6b0b 100644 --- a/google-cloud-bigqueryconnection/pom.xml +++ b/google-cloud-bigqueryconnection/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection - 0.4.0 + 0.4.1-SNAPSHOT jar Google Cloud BigQuery Connections https://github.com/googleapis/java-bigqueryconnection @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.0 + 0.4.1-SNAPSHOT google-cloud-bigqueryconnection diff --git a/grpc-google-cloud-bigqueryconnection-v1/pom.xml b/grpc-google-cloud-bigqueryconnection-v1/pom.xml index 1447737d..acc532b6 100644 --- a/grpc-google-cloud-bigqueryconnection-v1/pom.xml +++ b/grpc-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT grpc-google-cloud-bigqueryconnection-v1 GRPC library for grpc-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml b/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml index 900af145..d779ff16 100644 --- a/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT grpc-google-cloud-bigqueryconnection-v1beta1 GRPC library for grpc-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 245f9d59..44f54921 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryconnection-parent pom - 0.4.0 + 0.4.1-SNAPSHOT Google Cloud BigQuery Connections Parent https://github.com/googleapis/java-bigqueryconnection @@ -70,27 +70,27 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/proto-google-cloud-bigqueryconnection-v1/pom.xml b/proto-google-cloud-bigqueryconnection-v1/pom.xml index be71b2e6..55e5490e 100644 --- a/proto-google-cloud-bigqueryconnection-v1/pom.xml +++ b/proto-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.0 + 0.4.1-SNAPSHOT proto-google-cloud-bigqueryconnection-v1 PROTO library for proto-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml b/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml index 7a90b035..f205cac5 100644 --- a/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT proto-google-cloud-bigqueryconnection-v1beta1 PROTO library for proto-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index eb04742b..b6faee30 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 0de57106..72e77037 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-bigqueryconnection:0.4.0:0.4.0 -proto-google-cloud-bigqueryconnection-v1:0.4.0:0.4.0 -grpc-google-cloud-bigqueryconnection-v1:0.4.0:0.4.0 -proto-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.0 -grpc-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.0 \ No newline at end of file +google-cloud-bigqueryconnection:0.4.0:0.4.1-SNAPSHOT +proto-google-cloud-bigqueryconnection-v1:0.4.0:0.4.1-SNAPSHOT +grpc-google-cloud-bigqueryconnection-v1:0.4.0:0.4.1-SNAPSHOT +proto-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.1-SNAPSHOT +grpc-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.1-SNAPSHOT \ No newline at end of file From 1f90adc44d7bf4c59ddd76208d3f3c18c67de8ac Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Mon, 5 Oct 2020 16:28:02 -0400 Subject: [PATCH 02/31] build(ci): set up secrets(env vars) for samples ITs to unblock samples (#152) unblocks #151 --- .kokoro/build.sh | 5 +++++ .kokoro/nightly/samples.cfg | 2 +- .kokoro/presubmit/samples.cfg | 2 +- synth.py | 6 +++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 69d35914..2c1791c3 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,6 +71,11 @@ integration) samples) if [[ -f samples/pom.xml ]] then + if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secrets" ] + then + source "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secrets" + fi + pushd samples mvn -B \ -Penable-samples \ diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index f2542931..5585ccb4 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -29,7 +29,7 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" + value: "java-docs-samples-service-account, java-bigqueryconnection-samples-secrets" } env_vars: { diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg index 01e09600..3fd1ecc9 100644 --- a/.kokoro/presubmit/samples.cfg +++ b/.kokoro/presubmit/samples.cfg @@ -29,5 +29,5 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" + value: "java-docs-samples-service-account, java-bigqueryconnection-samples-secrets" } \ No newline at end of file diff --git a/synth.py b/synth.py index 4c0c84fe..ec846e95 100644 --- a/synth.py +++ b/synth.py @@ -30,4 +30,8 @@ destination_name='bigqueryconnection', ) -java.common_templates() \ No newline at end of file +java.common_templates(excludes=[ + '.kokoro/build.sh', + '.kokoro/nightly/samples.cfg', + '.kokoro/presubmit/samples.cfg', +]) \ No newline at end of file From 39a1f45a97604d90a31d1a31412b6c90eb22069e Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Tue, 6 Oct 2020 20:35:11 +0530 Subject: [PATCH 03/31] docs(samples): add create and delete connection (#151) --- .../bigqueryconnection/CreateConnection.java | 71 ++++++++++++ .../bigqueryconnection/DeleteConnection.java | 47 ++++++++ .../CreateConnectionIT.java | 108 ++++++++++++++++++ .../DeleteConnectionIT.java | 104 +++++++++++++++++ 4 files changed, 330 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java new file mode 100644 index 00000000..e22a695a --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java @@ -0,0 +1,71 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_create_connection] +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import com.google.cloud.bigquery.connection.v1.CreateConnectionRequest; +import com.google.cloud.bigquery.connection.v1.LocationName; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import java.io.IOException; + +// Sample to create a connection with cloud MySql database +public class CreateConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + String connectionId = "MY_CONNECTION_ID"; + String database = "MY_DATABASE"; + String instance = "MY_INSTANCE"; + String instanceLocation = "MY_INSTANCE_LOCATION"; + String username = "MY_USERNAME"; + String password = "MY_PASSWORD"; + String instanceId = String.format("%s:%s:%s", projectId, instanceLocation, instance); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(username).setPassword(password).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(database) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + createConnection(projectId, location, connectionId, connection); + } + + public static void createConnection( + String projectId, String location, String connectionId, Connection connection) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + LocationName parent = LocationName.of(projectId, location); + CreateConnectionRequest request = + CreateConnectionRequest.newBuilder() + .setParent(parent.toString()) + .setConnection(connection) + .setConnectionId(connectionId) + .build(); + Connection response = client.createConnection(request); + System.out.println("Connection created successfully :" + response.getName()); + } + } +} +// [END bigqueryconnection_create_connection] diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java new file mode 100644 index 00000000..0baca2a9 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_delete_connection] +import com.google.cloud.bigquery.connection.v1.ConnectionName; +import com.google.cloud.bigquery.connection.v1.DeleteConnectionRequest; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import java.io.IOException; + +// Sample to delete a connection +public class DeleteConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + String connectionName = "MY_CONNECTION_NAME"; + deleteConnection(projectId, location, connectionName); + } + + public static void deleteConnection(String projectId, String location, String connectionName) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + ConnectionName name = ConnectionName.of(projectId, location, connectionName); + DeleteConnectionRequest request = + DeleteConnectionRequest.newBuilder().setName(name.toString()).build(); + client.deleteConnection(request); + System.out.println("Connection deleted successfully"); + } + } +} +// [END bigqueryconnection_delete_connection] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java new file mode 100644 index 00000000..5b9b02b7 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateConnectionIT { + + private static final Logger LOG = Logger.getLogger(CreateConnectionIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() { + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testCreateConnection() throws IOException { + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = + Connection.newBuilder() + .setFriendlyName(connectionId) + .setCloudSql(cloudSqlProperties) + .build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + assertThat(bout.toString()).contains("Connection created successfully :"); + } +} diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java new file mode 100644 index 00000000..e7b2183b --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class DeleteConnectionIT { + + private static final Logger LOG = Logger.getLogger(DeleteConnectionIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + // create a temporary connection + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testDeleteConnection() throws IOException { + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + assertThat(bout.toString()).contains("Connection deleted successfully"); + } +} From 365d497e8587412e6c1f50bd5e53f8257e77e213 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Oct 2020 15:12:15 -0700 Subject: [PATCH 04/31] build(java): readme.sh should be executable (#154) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1577a69f-b958-44c5-b4b6-e43d046b326e/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0762e8ee2ec21cdfc4d82020b985a104feb0453b --- .kokoro/readme.sh | 0 synth.metadata | 7 ++----- 2 files changed, 2 insertions(+), 5 deletions(-) mode change 100644 => 100755 .kokoro/readme.sh diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh old mode 100644 new mode 100755 diff --git a/synth.metadata b/synth.metadata index 730500ff..dbffe3b7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "88fdcc246448f5fc8580ca4128c3a0fc1b5c8865" + "sha": "39a1f45a97604d90a31d1a31412b6c90eb22069e" } }, { @@ -27,7 +27,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" + "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" } } ], @@ -64,7 +64,6 @@ ".github/workflows/ci.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", - ".kokoro/build.sh", ".kokoro/coerce_logs.sh", ".kokoro/common.cfg", ".kokoro/common.sh", @@ -80,7 +79,6 @@ ".kokoro/nightly/java8-osx.cfg", ".kokoro/nightly/java8-win.cfg", ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/clirr.cfg", ".kokoro/presubmit/common.cfg", @@ -93,7 +91,6 @@ ".kokoro/presubmit/java8.cfg", ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", From a25731c55e85089fc341b74bea80678f21bd0c0e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Oct 2020 22:50:03 -0700 Subject: [PATCH 05/31] chore: regenerate README (#155) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-10-06 22:16:00,215 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigqueryconnection/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working directory clean 2020-10-06 22:16:01,194 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/8408a3d5-1a03-44e3-ad1d-ebea7b956240/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 18 ++++++++++++++++++ README.md | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 .github/readme/synth.metadata/synth.metadata diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata new file mode 100644 index 00000000..96ec3ea8 --- /dev/null +++ b/.github/readme/synth.metadata/synth.metadata @@ -0,0 +1,18 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/java-bigqueryconnection.git", + "sha": "365d497e8587412e6c1f50bd5e53f8257e77e213" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "487eba79f8260e34205d8ceb1ebcc65685085e19" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index ebd8b390..e24db347 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Create Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | +| Delete Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | | Quickstart Sample | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | From 0cdb6ce95bcb22084dfaf6a562783466398a3847 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 7 Oct 2020 21:06:40 +0530 Subject: [PATCH 06/31] docs(samples): add get connection (#156) --- .../bigqueryconnection/GetConnection.java | 48 ++++++++ .../bigqueryconnection/GetConnectionIT.java | 106 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java new file mode 100644 index 00000000..76f42cf0 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_get_connection] +import com.google.cloud.bigquery.connection.v1.Connection; +import com.google.cloud.bigquery.connection.v1.ConnectionName; +import com.google.cloud.bigquery.connection.v1.GetConnectionRequest; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import java.io.IOException; + +// Sample to get connection +public class GetConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + String connectionId = "MY_CONNECTION_ID"; + getConnection(projectId, location, connectionId); + } + + public static void getConnection(String projectId, String location, String connectionId) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + ConnectionName name = ConnectionName.of(projectId, location, connectionId); + GetConnectionRequest request = + GetConnectionRequest.newBuilder().setName(name.toString()).build(); + Connection response = client.getConnection(request); + System.out.println("Connection info retrieved successfully :" + response.getName()); + } + } +} +// [END bigqueryconnection_get_connection] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java new file mode 100644 index 00000000..6498ea17 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class GetConnectionIT { + + private static final Logger LOG = Logger.getLogger(GetConnectionIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + // create a temporary connection + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testGetConnection() throws IOException { + GetConnection.getConnection(PROJECT_ID, LOCATION, connectionId); + assertThat(bout.toString()).contains("Connection info retrieved successfully :"); + } +} From d015a4e5b435e07b5abbe35c4a61b609824227a8 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 7 Oct 2020 21:07:19 +0530 Subject: [PATCH 07/31] docs(samples): add list connections (#157) --- .../bigqueryconnection/ListConnections.java | 51 +++++++++ .../bigqueryconnection/ListConnectionsIT.java | 106 ++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java new file mode 100644 index 00000000..f5f456b3 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java @@ -0,0 +1,51 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_list_connections] +import com.google.cloud.bigquery.connection.v1.ListConnectionsRequest; +import com.google.cloud.bigquery.connection.v1.LocationName; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import java.io.IOException; + +// Sample to get list of connections +public class ListConnections { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + listConnections(projectId, location); + } + + public static void listConnections(String projectId, String location) throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + LocationName parent = LocationName.of(projectId, location); + int pageSize = 10; + ListConnectionsRequest request = + ListConnectionsRequest.newBuilder() + .setParent(parent.toString()) + .setPageSize(pageSize) + .build(); + client + .listConnections(request) + .iterateAll() + .forEach(con -> System.out.println("Connection Id :" + con.getName())); + } + } +} +// [END bigqueryconnection_list_connections] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java new file mode 100644 index 00000000..9646b3b2 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ListConnectionsIT { + + private static final Logger LOG = Logger.getLogger(ListConnectionsIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + // create a temporary connection + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testListConnections() throws IOException { + ListConnections.listConnections(PROJECT_ID, LOCATION); + assertThat(bout.toString()).contains("Connection Id :"); + } +} From 068dbc01aba88f7b13b483fa40a651e0d071822a Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 7 Oct 2020 21:08:36 +0530 Subject: [PATCH 08/31] docs(samples): add update connection (#158) --- samples/install-without-bom/pom.xml | 5 + samples/snapshot/pom.xml | 7 +- samples/snippets/pom.xml | 5 + .../bigqueryconnection/UpdateConnection.java | 58 ++++++++++ .../UpdateConnectionIT.java | 108 ++++++++++++++++++ 5 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index e1e9366b..bdabf37d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -33,6 +33,11 @@
+ + com.google.protobuf + protobuf-java-util + 3.13.0 + junit junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index b6faee30..bcdade0c 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -32,6 +32,11 @@ + + com.google.protobuf + protobuf-java-util + 3.13.0 + junit junit @@ -80,4 +85,4 @@ - \ No newline at end of file + diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 13ae0dcc..7fc0dd66 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -43,6 +43,11 @@ 0.3.1 + + com.google.protobuf + protobuf-java-util + 3.13.0 + junit junit diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java new file mode 100644 index 00000000..b3efce6a --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_update_connection] +import com.google.cloud.bigquery.connection.v1.Connection; +import com.google.cloud.bigquery.connection.v1.ConnectionName; +import com.google.cloud.bigquery.connection.v1.UpdateConnectionRequest; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; + +// Sample to update connection +public class UpdateConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + String connectionId = "MY_CONNECTION_ID"; + String description = "MY_DESCRIPTION"; + Connection connection = Connection.newBuilder().setDescription(description).build(); + updateConnection(projectId, location, connectionId, connection); + } + + public static void updateConnection( + String projectId, String location, String connectionId, Connection connection) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + ConnectionName name = ConnectionName.of(projectId, location, connectionId); + FieldMask updateMask = FieldMaskUtil.fromString("description"); + UpdateConnectionRequest request = + UpdateConnectionRequest.newBuilder() + .setName(name.toString()) + .setConnection(connection) + .setUpdateMask(updateMask) + .build(); + Connection response = client.updateConnection(request); + System.out.println("Connection updated successfully :" + response.getDescription()); + } + } +} +// [END bigqueryconnection_update_connection] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java new file mode 100644 index 00000000..d769b72a --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class UpdateConnectionIT { + + private static final Logger LOG = Logger.getLogger(UpdateConnectionIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + // create a temporary connection + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testUpdateConnection() throws IOException { + String description = "MY_DESCRIPTION"; + Connection connection = Connection.newBuilder().setDescription(description).build(); + UpdateConnection.updateConnection(PROJECT_ID, LOCATION, connectionId, connection); + assertThat(bout.toString()).contains("Connection updated successfully :"); + } +} From c921d612e497c90a9fdb9ccbe5aeee2d0c961a1a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 7 Oct 2020 08:44:05 -0700 Subject: [PATCH 09/31] chore: regenerate README (#159) --- .github/readme/synth.metadata/synth.metadata | 2 +- README.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 96ec3ea8..7cb59be4 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "365d497e8587412e6c1f50bd5e53f8257e77e213" + "sha": "068dbc01aba88f7b13b483fa40a651e0d071822a" } }, { diff --git a/README.md b/README.md index e24db347..714f4fca 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,10 @@ has instructions for running the samples. | --------------------------- | --------------------------------- | ------ | | Create Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | | Delete Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | +| Get Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java) | +| List Connections | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java) | | Quickstart Sample | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | +| Update Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java) | From 760c4888d30f532df8abc725849190487c056d22 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Thu, 8 Oct 2020 21:35:04 +0530 Subject: [PATCH 10/31] docs(samples): add share connection (#161) * docs(samples): add share connection * docs(samples): update member --- .../bigqueryconnection/ShareConnection.java | 59 ++++++++++ .../bigqueryconnection/ShareConnectionIT.java | 106 ++++++++++++++++++ 2 files changed, 165 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java new file mode 100644 index 00000000..b5ae8315 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_share_connection] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.bigquery.connection.v1.ConnectionName; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import com.google.iam.v1.Binding; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import java.io.IOException; + +// Sample to share connections +public class ShareConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + String location = "MY_LOCATION"; + String connectionId = "MY_CONNECTION_ID"; + shareConnection(projectId, location, connectionId); + } + + public static void shareConnection(String projectId, String location, String connectionId) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + ResourceName resource = ConnectionName.of(projectId, location, connectionId); + Binding binding = + Binding.newBuilder() + .addMembers("group:example-analyst-group@google.com") + .setRole("roles/bigquery.connectionUser") + .build(); + Policy policy = Policy.newBuilder().addBindings(binding).build(); + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource.toString()) + .setPolicy(policy) + .build(); + client.setIamPolicy(request); + System.out.println("Connection shared successfully"); + } + } +} +// [END bigqueryconnection_share_connection] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java new file mode 100644 index 00000000..670e2c37 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.CloudSqlCredential; +import com.google.cloud.bigquery.connection.v1.CloudSqlProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ShareConnectionIT { + + private static final Logger LOG = Logger.getLogger(ShareConnectionIT.class.getName()); + private static final String LOCATION = "US"; + private static final String REGION = "us-central1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String MY_SQL_DATABASE = requireEnvVar("MY_SQL_DATABASE"); + private static final String MY_SQL_INSTANCE = requireEnvVar("MY_SQL_INSTANCE"); + private static final String DB_USER = requireEnvVar("DB_USER"); + private static final String DB_PWD = requireEnvVar("DB_PWD"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("MY_SQL_DATABASE"); + requireEnvVar("MY_SQL_INSTANCE"); + requireEnvVar("DB_USER"); + requireEnvVar("DB_PWD"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + // create a temporary connection + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); + CloudSqlCredential cloudSqlCredential = + CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); + CloudSqlProperties cloudSqlProperties = + CloudSqlProperties.newBuilder() + .setType(CloudSqlProperties.DatabaseType.MYSQL) + .setDatabase(MY_SQL_DATABASE) + .setInstanceId(instanceId) + .setCredential(cloudSqlCredential) + .build(); + Connection connection = Connection.newBuilder().setCloudSql(cloudSqlProperties).build(); + CreateConnection.createConnection(PROJECT_ID, LOCATION, connectionId, connection); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testShareConnection() throws IOException { + ShareConnection.shareConnection(PROJECT_ID, LOCATION, connectionId); + assertThat(bout.toString()).contains("Connection shared successfully"); + } +} From 59fa9aed468c9fa13e538ecdcff4c452d870ef49 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Fri, 9 Oct 2020 21:16:10 +0530 Subject: [PATCH 11/31] docs(samples): add create aws connection (#163) --- samples/install-without-bom/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- .../CreateAwsConnection.java | 66 +++++++++++++ .../CreateAwsConnectionIT.java | 92 +++++++++++++++++++ 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index bdabf37d..44c3b4e0 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigqueryconnection - 0.3.1 + 0.4.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 7fc0dd66..9df94882 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -40,7 +40,7 @@ com.google.cloud google-cloud-bigqueryconnection - 0.3.1 + 0.4.0 diff --git a/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java b/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java new file mode 100644 index 00000000..072025b3 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +// [START bigqueryconnection_create_aws_connection] +import com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole; +import com.google.cloud.bigquery.connection.v1.AwsProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import com.google.cloud.bigquery.connection.v1.CreateConnectionRequest; +import com.google.cloud.bigquery.connection.v1.LocationName; +import com.google.cloud.bigqueryconnection.v1.ConnectionServiceClient; +import java.io.IOException; + +// Sample to create aws connection +public class CreateAwsConnection { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String projectId = "MY_PROJECT_ID"; + // Note: As of now location only supports aws-us-east-1 + String location = "MY_LOCATION"; + String connectionId = "MY_CONNECTION_ID"; + // Example of role id arn:aws:iam::accountId:role/myrole + String iamRoleId = "MY_AWS_ROLE_ID"; + AwsCrossAccountRole role = AwsCrossAccountRole.newBuilder().setIamRoleId(iamRoleId).build(); + AwsProperties awsProperties = AwsProperties.newBuilder().setCrossAccountRole(role).build(); + Connection connection = Connection.newBuilder().setAws(awsProperties).build(); + createAwsConnection(projectId, location, connectionId, connection); + } + + public static void createAwsConnection( + String projectId, String location, String connectionId, Connection connection) + throws IOException { + try (ConnectionServiceClient client = ConnectionServiceClient.create()) { + LocationName parent = LocationName.of(projectId, location); + CreateConnectionRequest request = + CreateConnectionRequest.newBuilder() + .setParent(parent.toString()) + .setConnection(connection) + .setConnectionId(connectionId) + .build(); + Connection response = client.createConnection(request); + AwsCrossAccountRole role = response.getAws().getCrossAccountRole(); + System.out.println( + "Aws connection created successfully : Aws userId :" + + role.getIamUserId() + + " Aws externalId :" + + role.getExternalId()); + } + } +} +// [END bigqueryconnection_create_aws_connection] diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java new file mode 100644 index 00000000..a8c809d1 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java @@ -0,0 +1,92 @@ +/* + * Copyright 2020 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. + */ + +package com.example.bigqueryconnection; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole; +import com.google.cloud.bigquery.connection.v1.AwsProperties; +import com.google.cloud.bigquery.connection.v1.Connection; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateAwsConnectionIT { + + private static final Logger LOG = Logger.getLogger(CreateAwsConnectionIT.class.getName()); + private static final String LOCATION = "aws-us-east-1"; + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String AWS_ACCOUNT_ID = requireEnvVar("AWS_ACCOUNT_ID"); + private static final String AWS_ROLE_ID = requireEnvVar("AWS_ROLE_ID"); + + private String connectionId; + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("AWS_ACCOUNT_ID"); + requireEnvVar("AWS_ROLE_ID"); + } + + @Before + public void setUp() { + connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteConnection.deleteConnection(PROJECT_ID, LOCATION, connectionId); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testCreateAwsConnection() throws IOException { + String iamRoleId = String.format("arn:aws:iam::%s:role/%s", AWS_ACCOUNT_ID, AWS_ROLE_ID); + AwsCrossAccountRole role = AwsCrossAccountRole.newBuilder().setIamRoleId(iamRoleId).build(); + AwsProperties awsProperties = AwsProperties.newBuilder().setCrossAccountRole(role).build(); + Connection connection = Connection.newBuilder().setAws(awsProperties).build(); + CreateAwsConnection.createAwsConnection(PROJECT_ID, LOCATION, connectionId, connection); + assertThat(bout.toString()).contains("Aws connection created successfully :"); + } +} From 2e64de9ac55b468b0c523ee66081c3c5b0fd8fd4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 9 Oct 2020 09:56:38 -0700 Subject: [PATCH 12/31] chore: regenerate README (#164) --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 7cb59be4..2fee31c9 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "068dbc01aba88f7b13b483fa40a651e0d071822a" + "sha": "59fa9aed468c9fa13e538ecdcff4c452d870ef49" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "487eba79f8260e34205d8ceb1ebcc65685085e19" + "sha": "b6164c26a111f7f587099d31253abb96b5737bb2" } } ] diff --git a/README.md b/README.md index 714f4fca..9bc8a8d8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-bigqueryconnection - 0.3.1 + 0.4.0 ``` @@ -75,11 +75,13 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Create Aws Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/CreateAwsConnection.java) | | Create Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/CreateConnection.java) | | Delete Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/DeleteConnection.java) | | Get Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/GetConnection.java) | | List Connections | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/ListConnections.java) | | Quickstart Sample | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/QuickstartSample.java) | +| Share Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/ShareConnection.java) | | Update Connection | [source code](https://github.com/googleapis/java-bigqueryconnection/blob/master/samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryconnection&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryconnection/UpdateConnection.java) | From 856289308d733dee955c592c02dbad931ae19deb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 22:12:44 +0200 Subject: [PATCH 13/31] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.1.1 (#165) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44f54921..b4f83c0b 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.0 + 3.1.1 From cd1cfc12582d90e2704144a44100b68779dd4041 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 22:14:24 +0200 Subject: [PATCH 14/31] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.21 (#166) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 44c3b4e0..995c9ffc 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index b44601c5..4d910fcb 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index bcdade0c..e7f220b0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9df94882..eef4306e 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 From 19a482ba80ff342eeb70fba89b973b39c59f6422 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 22:14:42 +0200 Subject: [PATCH 15/31] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 (#167) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4f83c0b..c8d80b6b 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.9.0 + 0.10.2 pom import From 7ec31278deaeb38f4b4c69e84579326e1d0e4bad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 22:15:02 +0200 Subject: [PATCH 16/31] chore(deps): update dependency com.google.cloud:libraries-bom to v12 (#168) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index eef4306e..10b5ec09 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 9.1.0 + 12.0.0 pom import From c167ec888021ab0e98130c74290a9649227e4c52 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Tue, 13 Oct 2020 12:52:02 -0400 Subject: [PATCH 17/31] ci: restrict presubmit samples ITs to only snapshot (#170) to address incessant quota issue --- .kokoro/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2c1791c3..bed3431f 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,14 +69,21 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] + then + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] then if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secrets" ] then source "${KOKORO_GFILE_DIR}/secret_manager/java-bigqueryconnection-samples-secrets" fi - pushd samples + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ From 801a00120eaa5e62810f9390e4bb818fc2f77995 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 13 Oct 2020 10:47:54 -0700 Subject: [PATCH 18/31] chore: regenerate README (#171) --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 2fee31c9..cb1d5c46 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "59fa9aed468c9fa13e538ecdcff4c452d870ef49" + "sha": "c167ec888021ab0e98130c74290a9649227e4c52" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b6164c26a111f7f587099d31253abb96b5737bb2" + "sha": "3c1fd09ba8d1c7b7092662f6f8330f521d4e7739" } } ] diff --git a/README.md b/README.md index 9bc8a8d8..7b30a08f 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,6 @@ If you are using Maven, add this to your pom.xml file: ``` -[//]: # ({x-version-update-start:google-cloud-bigqueryconnection:released}) - If you are using Gradle, add this to your dependencies ```Groovy compile 'com.google.cloud:google-cloud-bigqueryconnection:0.4.0' @@ -35,7 +33,6 @@ If you are using SBT, add this to your dependencies ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryconnection" % "0.4.0" ``` -[//]: # ({x-version-update-end}) ## Authentication From b48c513694b8f8e04d9197f4af60595721f737ca Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 07:54:46 -0700 Subject: [PATCH 19/31] ci(java): suggest formatting fixes (#175) GitHub action config to run the java formatter and suggest inline fixes on the pull request. This was tested in java-asset: [example PR](https://github.com/googleapis/java-asset/pull/392). Source-Author: Jeff Ching Source-Date: Tue Oct 13 09:04:08 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: b65ef07d99946d23e900ef2cc490274a16edd336 Source-Link: https://github.com/googleapis/synthtool/commit/b65ef07d99946d23e900ef2cc490274a16edd336 --- .github/workflows/formatting.yaml | 25 +++++++++++++++++++++++++ synth.metadata | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 00000000..d4d367cf --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,25 @@ +on: + pull_request_target: + types: [opened, synchronize] + branches: + - master +name: format +jobs: + format-code: + runs-on: ubuntu-latest + env: + ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/setup-java@v1 + with: + java-version: 11 + - run: "mvn com.coveo:fmt-maven-plugin:format" + - uses: googleapis/code-suggester@v1.8.0 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' diff --git a/synth.metadata b/synth.metadata index dbffe3b7..b417a772 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "39a1f45a97604d90a31d1a31412b6c90eb22069e" + "sha": "801a00120eaa5e62810f9390e4bb818fc2f77995" } }, { @@ -27,7 +27,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" } } ], @@ -62,6 +62,7 @@ ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/coerce_logs.sh", From 41f272f181a199a612c36b83f980ce142af2dc1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2020 14:58:05 +0000 Subject: [PATCH 20/31] build(deps-dev): bump junit from 4.13 to 4.13.1 in /samples/snippets (#172) Bumps [junit](https://github.com/junit-team/junit4) from 4.13 to 4.13.1.
Release notes

Sourced from junit's releases.

JUnit 4.13.1

Please refer to the release notes for details.

Changelog

Sourced from junit's changelog.

Summary of changes in version 4.13.1

Rules

Security fix: TemporaryFolder now limits access to temporary folders on Java 1.7 or later

A local information disclosure vulnerability in TemporaryFolder has been fixed. See the published security advisory for details.

Test Runners

[Pull request #1669:](junit-team/junit#1669) Make FrameworkField constructor public

Prior to this change, custom runners could make FrameworkMethod instances, but not FrameworkField instances. This small change allows for both now, because FrameworkField's constructor has been promoted from package-private to public.

Commits
  • 1b683f4 [maven-release-plugin] prepare release r4.13.1
  • ce6ce3a Draft 4.13.1 release notes
  • c29dd82 Change version to 4.13.1-SNAPSHOT
  • 1d17486 Add a link to assertThrows in exception testing
  • 543905d Use separate line for annotation in Javadoc
  • 510e906 Add sub headlines to class Javadoc
  • 610155b Merge pull request from GHSA-269g-pwp5-87pp
  • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
  • a5d205c Fix GitHub link in FAQ (#1672)
  • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=junit:junit&package-manager=maven&previous-version=4.13&new-version=4.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/googleapis/java-bigqueryconnection/network/alerts).
--- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 10b5ec09..c7b418bf 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -51,7 +51,7 @@ junit junit - 4.13 + 4.13.1 test From dd4f1e086217a6b77594e44532ebfa4ec7a04374 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2020 14:58:10 +0000 Subject: [PATCH 21/31] build(deps-dev): bump junit from 4.13 to 4.13.1 in /samples/snapshot (#173) Bumps [junit](https://github.com/junit-team/junit4) from 4.13 to 4.13.1.
Release notes

Sourced from junit's releases.

JUnit 4.13.1

Please refer to the release notes for details.

Changelog

Sourced from junit's changelog.

Summary of changes in version 4.13.1

Rules

Security fix: TemporaryFolder now limits access to temporary folders on Java 1.7 or later

A local information disclosure vulnerability in TemporaryFolder has been fixed. See the published security advisory for details.

Test Runners

[Pull request #1669:](junit-team/junit#1669) Make FrameworkField constructor public

Prior to this change, custom runners could make FrameworkMethod instances, but not FrameworkField instances. This small change allows for both now, because FrameworkField's constructor has been promoted from package-private to public.

Commits
  • 1b683f4 [maven-release-plugin] prepare release r4.13.1
  • ce6ce3a Draft 4.13.1 release notes
  • c29dd82 Change version to 4.13.1-SNAPSHOT
  • 1d17486 Add a link to assertThrows in exception testing
  • 543905d Use separate line for annotation in Javadoc
  • 510e906 Add sub headlines to class Javadoc
  • 610155b Merge pull request from GHSA-269g-pwp5-87pp
  • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
  • a5d205c Fix GitHub link in FAQ (#1672)
  • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=junit:junit&package-manager=maven&previous-version=4.13&new-version=4.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/googleapis/java-bigqueryconnection/network/alerts).
--- samples/snapshot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index e7f220b0..4f6d5005 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -40,7 +40,7 @@ junit junit - 4.13 + 4.13.1 test From 044ac787319958239348e9f7c36b593e0b542696 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2020 15:00:04 +0000 Subject: [PATCH 22/31] build(deps): bump junit from 4.13 to 4.13.1 (#176) Bumps [junit](https://github.com/junit-team/junit4) from 4.13 to 4.13.1.
Release notes

Sourced from junit's releases.

JUnit 4.13.1

Please refer to the release notes for details.

Changelog

Sourced from junit's changelog.

Summary of changes in version 4.13.1

Rules

Security fix: TemporaryFolder now limits access to temporary folders on Java 1.7 or later

A local information disclosure vulnerability in TemporaryFolder has been fixed. See the published security advisory for details.

Test Runners

[Pull request #1669:](junit-team/junit#1669) Make FrameworkField constructor public

Prior to this change, custom runners could make FrameworkMethod instances, but not FrameworkField instances. This small change allows for both now, because FrameworkField's constructor has been promoted from package-private to public.

Commits
  • 1b683f4 [maven-release-plugin] prepare release r4.13.1
  • ce6ce3a Draft 4.13.1 release notes
  • c29dd82 Change version to 4.13.1-SNAPSHOT
  • 1d17486 Add a link to assertThrows in exception testing
  • 543905d Use separate line for annotation in Javadoc
  • 510e906 Add sub headlines to class Javadoc
  • 610155b Merge pull request from GHSA-269g-pwp5-87pp
  • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
  • a5d205c Fix GitHub link in FAQ (#1672)
  • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=junit:junit&package-manager=maven&previous-version=4.13&new-version=4.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/googleapis/java-bigqueryconnection/network/alerts).
--- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8d80b6b..75a0aec1 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ junit junit - 4.13 + 4.13.1 test
From 223560b8e65313ae048831ae5dded34907d923bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Oct 2020 15:00:11 +0000 Subject: [PATCH 23/31] build(deps-dev): bump junit from 4.13 to 4.13.1 in /samples/install-without-bom (#174) Bumps [junit](https://github.com/junit-team/junit4) from 4.13 to 4.13.1.
Release notes

Sourced from junit's releases.

JUnit 4.13.1

Please refer to the release notes for details.

Changelog

Sourced from junit's changelog.

Summary of changes in version 4.13.1

Rules

Security fix: TemporaryFolder now limits access to temporary folders on Java 1.7 or later

A local information disclosure vulnerability in TemporaryFolder has been fixed. See the published security advisory for details.

Test Runners

[Pull request #1669:](junit-team/junit#1669) Make FrameworkField constructor public

Prior to this change, custom runners could make FrameworkMethod instances, but not FrameworkField instances. This small change allows for both now, because FrameworkField's constructor has been promoted from package-private to public.

Commits
  • 1b683f4 [maven-release-plugin] prepare release r4.13.1
  • ce6ce3a Draft 4.13.1 release notes
  • c29dd82 Change version to 4.13.1-SNAPSHOT
  • 1d17486 Add a link to assertThrows in exception testing
  • 543905d Use separate line for annotation in Javadoc
  • 510e906 Add sub headlines to class Javadoc
  • 610155b Merge pull request from GHSA-269g-pwp5-87pp
  • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
  • a5d205c Fix GitHub link in FAQ (#1672)
  • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=junit:junit&package-manager=maven&previous-version=4.13&new-version=4.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/googleapis/java-bigqueryconnection/network/alerts).
--- samples/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 995c9ffc..5edab34f 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -41,7 +41,7 @@ junit junit - 4.13 + 4.13.1 test From f11c5093086372cd3b3012041ced58aba0e14877 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 20:38:05 +0200 Subject: [PATCH 24/31] chore(deps): update dependency com.google.cloud:libraries-bom to v12.1.0 (#177) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `12.0.0` -> `12.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- 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-bigqueryconnection). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c7b418bf..3af77db6 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From 7cf25d082fecdbe5dc2efa7125cb30ee07595129 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 20:38:08 +0200 Subject: [PATCH 25/31] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 (#178) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | minor | `0.10.2` -> `0.11.0` | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v0.11.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​0110-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare0102v0110-2020-10-13) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v0.10.2...v0.11.0) ##### Dependencies - update dependency com.google.http-client:google-http-client-bom to v1.37.0 ([#​166](https://www.github.com/googleapis/java-shared-dependencies/issues/166)) ([5721225](https://www.github.com/googleapis/java-shared-dependencies/commit/572122574ce8452b6a0fc6df919e9ce2d8ffd2ce)) - update dependency io.grpc:grpc-bom to v1.32.2 ([#​165](https://www.github.com/googleapis/java-shared-dependencies/issues/165)) ([b70ddb0](https://www.github.com/googleapis/java-shared-dependencies/commit/b70ddb00a3be97536cdd80bd57fe6bca1b0973e2)) ##### [0.10.2](https://www.github.com/googleapis/java-shared-dependencies/compare/0.10.1...v0.10.2) (2020-10-08) ##### Dependencies - update dependency org.threeten:threetenbp to v1.4.5 ([#​162](https://www.github.com/googleapis/java-shared-dependencies/issues/162)) ([54eccb5](https://www.github.com/googleapis/java-shared-dependencies/commit/54eccb533353ddfe537a7e069a696a3f0f70f211)) ##### [0.10.1](https://www.github.com/googleapis/java-shared-dependencies/compare/0.10.0...v0.10.1) (2020-10-06) ##### Dependencies - update gax.version to v1.59.1 ([#​159](https://www.github.com/googleapis/java-shared-dependencies/issues/159)) ([7c84443](https://www.github.com/googleapis/java-shared-dependencies/commit/7c84443db92e1d910590fa89c2e35b14613e7eba))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- 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-bigqueryconnection). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 75a0aec1..98bb35e2 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.10.2 + 0.11.0 pom import From e99ab57256175006a2d65e860854959837e0741c Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Fri, 16 Oct 2020 20:19:34 +0530 Subject: [PATCH 26/31] refactor(samples): update names (#182) --- .../com/example/bigqueryconnection/CreateAwsConnectionIT.java | 2 +- .../java/com/example/bigqueryconnection/CreateConnectionIT.java | 2 +- .../java/com/example/bigqueryconnection/DeleteConnectionIT.java | 2 +- .../java/com/example/bigqueryconnection/GetConnectionIT.java | 2 +- .../java/com/example/bigqueryconnection/ListConnectionsIT.java | 2 +- .../java/com/example/bigqueryconnection/ShareConnectionIT.java | 2 +- .../java/com/example/bigqueryconnection/UpdateConnectionIT.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java index a8c809d1..e7dc2d85 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateAwsConnectionIT.java @@ -63,7 +63,7 @@ public static void checkRequirements() { @Before public void setUp() { - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "CREATE_AWS_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); bout = new ByteArrayOutputStream(); out = new PrintStream(bout); originalPrintStream = System.out; diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java index 5b9b02b7..0012d2c7 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/CreateConnectionIT.java @@ -68,7 +68,7 @@ public static void checkRequirements() { @Before public void setUp() { - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "CREATE_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); bout = new ByteArrayOutputStream(); out = new PrintStream(bout); originalPrintStream = System.out; diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java index e7b2183b..6ea2a8f7 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/DeleteConnectionIT.java @@ -73,7 +73,7 @@ public void setUp() throws IOException { originalPrintStream = System.out; System.setOut(out); // create a temporary connection - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "DELETE_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); CloudSqlCredential cloudSqlCredential = CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java index 6498ea17..49dcf638 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/GetConnectionIT.java @@ -73,7 +73,7 @@ public void setUp() throws IOException { originalPrintStream = System.out; System.setOut(out); // create a temporary connection - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "GET_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); CloudSqlCredential cloudSqlCredential = CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java index 9646b3b2..47001b94 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/ListConnectionsIT.java @@ -73,7 +73,7 @@ public void setUp() throws IOException { originalPrintStream = System.out; System.setOut(out); // create a temporary connection - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "LIST_CONNECTIONS_TEST_" + UUID.randomUUID().toString().substring(0, 8); String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); CloudSqlCredential cloudSqlCredential = CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java index 670e2c37..8daf09bb 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/ShareConnectionIT.java @@ -73,7 +73,7 @@ public void setUp() throws IOException { originalPrintStream = System.out; System.setOut(out); // create a temporary connection - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "SHARE_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); CloudSqlCredential cloudSqlCredential = CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); diff --git a/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java b/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java index d769b72a..ff3dc50d 100644 --- a/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java +++ b/samples/snippets/src/test/java/com/example/bigqueryconnection/UpdateConnectionIT.java @@ -73,7 +73,7 @@ public void setUp() throws IOException { originalPrintStream = System.out; System.setOut(out); // create a temporary connection - connectionId = "MY_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); + connectionId = "UPDATE_CONNECTION_TEST_" + UUID.randomUUID().toString().substring(0, 8); String instanceId = String.format("%s:%s:%s", PROJECT_ID, REGION, MY_SQL_INSTANCE); CloudSqlCredential cloudSqlCredential = CloudSqlCredential.newBuilder().setUsername(DB_USER).setPassword(DB_PWD).build(); From 081f3dc4f04f16b6a042eed0ba4dd566c7a918ec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 09:10:13 -0700 Subject: [PATCH 27/31] build(java): auto-approve README regeneration (#181) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3522a8b4-2636-4631-9449-70abbf240098/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1 --- .github/workflows/approve-readme.yaml | 54 +++++++++++++++++++++++++++ synth.metadata | 5 ++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/approve-readme.yaml diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..e2d841d6 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/synth.metadata b/synth.metadata index b417a772..a18b7f3d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryconnection.git", - "sha": "801a00120eaa5e62810f9390e4bb818fc2f77995" + "sha": "7cf25d082fecdbe5dc2efa7125cb30ee07595129" } }, { @@ -27,7 +27,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" + "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" } } ], @@ -60,6 +60,7 @@ ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", ".github/workflows/formatting.yaml", From 05dacb57531c5d024edf400a030522779fc072fd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 18:14:53 +0200 Subject: [PATCH 28/31] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v0.9.3 (#180) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | patch | `0.9.2` -> `0.9.3` | --- ### Release Notes
googleapis/java-shared-config ### [`v0.9.3`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​093-httpswwwgithubcomgoogleapisjava-shared-configcomparev092v093-2020-10-15) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.9.2...v0.9.3)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- 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-bigqueryconnection). --- google-cloud-bigqueryconnection-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigqueryconnection-bom/pom.xml b/google-cloud-bigqueryconnection-bom/pom.xml index cd6fb474..608bda72 100644 --- a/google-cloud-bigqueryconnection-bom/pom.xml +++ b/google-cloud-bigqueryconnection-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 Google Cloud BigQuery Connections BOM diff --git a/pom.xml b/pom.xml index 98bb35e2..1c9bc45d 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 From ce2f15062bab653a8b902bd200e84b3c1a17abc6 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Fri, 16 Oct 2020 17:28:06 -0400 Subject: [PATCH 29/31] chore: add property tag for shared-deps (#183) --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1c9bc45d..4ffdda32 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,7 @@ UTF-8 github google-cloud-bigqueryconnection-parent + 0.11.0
@@ -96,7 +97,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.11.0 + ${google.cloud.shared-dependencies.version} pom import @@ -203,4 +204,4 @@ - \ No newline at end of file + From 4ee6b7d55b8cf943327c4928d6d77489b42054b0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 19 Oct 2020 18:56:52 +0200 Subject: [PATCH 30/31] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 (#184) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ffdda32..7f605895 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,7 @@ UTF-8 github google-cloud-bigqueryconnection-parent - 0.11.0 + 0.12.1 From d3be13cd32629ab03e3179121d7948101767e950 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2020 17:02:02 +0000 Subject: [PATCH 31/31] chore: release 0.4.1 (#153) :robot: I have created a release \*beep\* \*boop\* --- ### [0.4.1](https://www.github.com/googleapis/java-bigqueryconnection/compare/v0.4.0...v0.4.1) (2020-10-16) ### Documentation * **samples:** add create and delete connection ([#151](https://www.github.com/googleapis/java-bigqueryconnection/issues/151)) ([39a1f45](https://www.github.com/googleapis/java-bigqueryconnection/commit/39a1f45a97604d90a31d1a31412b6c90eb22069e)) * **samples:** add create aws connection ([#163](https://www.github.com/googleapis/java-bigqueryconnection/issues/163)) ([59fa9ae](https://www.github.com/googleapis/java-bigqueryconnection/commit/59fa9aed468c9fa13e538ecdcff4c452d870ef49)) * **samples:** add get connection ([#156](https://www.github.com/googleapis/java-bigqueryconnection/issues/156)) ([0cdb6ce](https://www.github.com/googleapis/java-bigqueryconnection/commit/0cdb6ce95bcb22084dfaf6a562783466398a3847)) * **samples:** add list connections ([#157](https://www.github.com/googleapis/java-bigqueryconnection/issues/157)) ([d015a4e](https://www.github.com/googleapis/java-bigqueryconnection/commit/d015a4e5b435e07b5abbe35c4a61b609824227a8)) * **samples:** add share connection ([#161](https://www.github.com/googleapis/java-bigqueryconnection/issues/161)) ([760c488](https://www.github.com/googleapis/java-bigqueryconnection/commit/760c4888d30f532df8abc725849190487c056d22)) * **samples:** add update connection ([#158](https://www.github.com/googleapis/java-bigqueryconnection/issues/158)) ([068dbc0](https://www.github.com/googleapis/java-bigqueryconnection/commit/068dbc01aba88f7b13b483fa40a651e0d071822a)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#167](https://www.github.com/googleapis/java-bigqueryconnection/issues/167)) ([19a482b](https://www.github.com/googleapis/java-bigqueryconnection/commit/19a482ba80ff342eeb70fba89b973b39c59f6422)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 ([#178](https://www.github.com/googleapis/java-bigqueryconnection/issues/178)) ([7cf25d0](https://www.github.com/googleapis/java-bigqueryconnection/commit/7cf25d082fecdbe5dc2efa7125cb30ee07595129)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 18 ++++++++++++++++++ google-cloud-bigqueryconnection-bom/pom.xml | 12 ++++++------ google-cloud-bigqueryconnection/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 10 files changed, 46 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0790ae84..8d50b750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +### [0.4.1](https://www.github.com/googleapis/java-bigqueryconnection/compare/v0.4.0...v0.4.1) (2020-10-16) + + +### Documentation + +* **samples:** add create and delete connection ([#151](https://www.github.com/googleapis/java-bigqueryconnection/issues/151)) ([39a1f45](https://www.github.com/googleapis/java-bigqueryconnection/commit/39a1f45a97604d90a31d1a31412b6c90eb22069e)) +* **samples:** add create aws connection ([#163](https://www.github.com/googleapis/java-bigqueryconnection/issues/163)) ([59fa9ae](https://www.github.com/googleapis/java-bigqueryconnection/commit/59fa9aed468c9fa13e538ecdcff4c452d870ef49)) +* **samples:** add get connection ([#156](https://www.github.com/googleapis/java-bigqueryconnection/issues/156)) ([0cdb6ce](https://www.github.com/googleapis/java-bigqueryconnection/commit/0cdb6ce95bcb22084dfaf6a562783466398a3847)) +* **samples:** add list connections ([#157](https://www.github.com/googleapis/java-bigqueryconnection/issues/157)) ([d015a4e](https://www.github.com/googleapis/java-bigqueryconnection/commit/d015a4e5b435e07b5abbe35c4a61b609824227a8)) +* **samples:** add share connection ([#161](https://www.github.com/googleapis/java-bigqueryconnection/issues/161)) ([760c488](https://www.github.com/googleapis/java-bigqueryconnection/commit/760c4888d30f532df8abc725849190487c056d22)) +* **samples:** add update connection ([#158](https://www.github.com/googleapis/java-bigqueryconnection/issues/158)) ([068dbc0](https://www.github.com/googleapis/java-bigqueryconnection/commit/068dbc01aba88f7b13b483fa40a651e0d071822a)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#167](https://www.github.com/googleapis/java-bigqueryconnection/issues/167)) ([19a482b](https://www.github.com/googleapis/java-bigqueryconnection/commit/19a482ba80ff342eeb70fba89b973b39c59f6422)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 ([#178](https://www.github.com/googleapis/java-bigqueryconnection/issues/178)) ([7cf25d0](https://www.github.com/googleapis/java-bigqueryconnection/commit/7cf25d082fecdbe5dc2efa7125cb30ee07595129)) + ## [0.4.0](https://www.github.com/googleapis/java-bigqueryconnection/compare/v0.3.4...v0.4.0) (2020-10-02) diff --git a/google-cloud-bigqueryconnection-bom/pom.xml b/google-cloud-bigqueryconnection-bom/pom.xml index 608bda72..35ea5b42 100644 --- a/google-cloud-bigqueryconnection-bom/pom.xml +++ b/google-cloud-bigqueryconnection-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection-bom - 0.4.1-SNAPSHOT + 0.4.1 pom com.google.cloud @@ -64,27 +64,27 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/google-cloud-bigqueryconnection/pom.xml b/google-cloud-bigqueryconnection/pom.xml index 2a0f6b0b..c986f7a9 100644 --- a/google-cloud-bigqueryconnection/pom.xml +++ b/google-cloud-bigqueryconnection/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryconnection - 0.4.1-SNAPSHOT + 0.4.1 jar Google Cloud BigQuery Connections https://github.com/googleapis/java-bigqueryconnection @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.1-SNAPSHOT + 0.4.1 google-cloud-bigqueryconnection diff --git a/grpc-google-cloud-bigqueryconnection-v1/pom.xml b/grpc-google-cloud-bigqueryconnection-v1/pom.xml index acc532b6..e5b7af60 100644 --- a/grpc-google-cloud-bigqueryconnection-v1/pom.xml +++ b/grpc-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 grpc-google-cloud-bigqueryconnection-v1 GRPC library for grpc-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml b/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml index d779ff16..92886802 100644 --- a/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/grpc-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 grpc-google-cloud-bigqueryconnection-v1beta1 GRPC library for grpc-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/pom.xml b/pom.xml index 7f605895..8ed42125 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryconnection-parent pom - 0.4.1-SNAPSHOT + 0.4.1 Google Cloud BigQuery Connections Parent https://github.com/googleapis/java-bigqueryconnection @@ -71,27 +71,27 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/proto-google-cloud-bigqueryconnection-v1/pom.xml b/proto-google-cloud-bigqueryconnection-v1/pom.xml index 55e5490e..dd9d3119 100644 --- a/proto-google-cloud-bigqueryconnection-v1/pom.xml +++ b/proto-google-cloud-bigqueryconnection-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1 - 0.4.1-SNAPSHOT + 0.4.1 proto-google-cloud-bigqueryconnection-v1 PROTO library for proto-google-cloud-bigqueryconnection-v1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml b/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml index f205cac5..a6364f51 100644 --- a/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml +++ b/proto-google-cloud-bigqueryconnection-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryconnection-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 proto-google-cloud-bigqueryconnection-v1beta1 PROTO library for proto-google-cloud-bigqueryconnection-v1beta1 com.google.cloud google-cloud-bigqueryconnection-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4f6d5005..68acd4e4 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigqueryconnection - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/versions.txt b/versions.txt index 72e77037..a923e1d9 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-bigqueryconnection:0.4.0:0.4.1-SNAPSHOT -proto-google-cloud-bigqueryconnection-v1:0.4.0:0.4.1-SNAPSHOT -grpc-google-cloud-bigqueryconnection-v1:0.4.0:0.4.1-SNAPSHOT -proto-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.1-SNAPSHOT -grpc-google-cloud-bigqueryconnection-v1beta1:0.4.0:0.4.1-SNAPSHOT \ No newline at end of file +google-cloud-bigqueryconnection:0.4.1:0.4.1 +proto-google-cloud-bigqueryconnection-v1:0.4.1:0.4.1 +grpc-google-cloud-bigqueryconnection-v1:0.4.1:0.4.1 +proto-google-cloud-bigqueryconnection-v1beta1:0.4.1:0.4.1 +grpc-google-cloud-bigqueryconnection-v1beta1:0.4.1:0.4.1 \ No newline at end of file