From 52593ec866884eb8eab68868c7ee53376c39e97a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 00:46:15 +0000 Subject: [PATCH 1/5] chore: resolve issue with prerelease presubmit [autoapprove] (#236) Source-Link: https://github.com/googleapis/synthtool/commit/1b9ad7694e44ddb4d9844df55ff7af77b51a4435 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 --- .github/.OwlBot.lock.yaml | 4 ++-- noxfile.py | 33 ++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 58fcbee..0eb02fd 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93 -# created: 2022-07-14T01:58:16.015625351Z + digest: sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 +# created: 2022-07-25T16:02:49.174178716Z diff --git a/noxfile.py b/noxfile.py index 94b2f9c..cc39f3b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -334,7 +334,8 @@ def prerelease_deps(session): # Install all dependencies session.install("-e", ".[all, tests, tracing]") - session.install(*UNIT_TEST_STANDARD_DEPENDENCIES) + unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES + session.install(*unit_deps_all) system_deps_all = ( SYSTEM_TEST_STANDARD_DEPENDENCIES + SYSTEM_TEST_EXTERNAL_DEPENDENCIES @@ -363,12 +364,6 @@ def prerelease_deps(session): session.install(*constraints_deps) - if os.path.exists("samples/snippets/requirements.txt"): - session.install("-r", "samples/snippets/requirements.txt") - - if os.path.exists("samples/snippets/requirements-test.txt"): - session.install("-r", "samples/snippets/requirements-test.txt") - prerel_deps = [ "protobuf", # dependency of grpc @@ -405,11 +400,19 @@ def prerelease_deps(session): system_test_folder_path = os.path.join("tests", "system") # Only run system tests if found. - if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path): - session.run("py.test", "tests/system") - - snippets_test_path = os.path.join("samples", "snippets") - - # Only run samples tests if found. - if os.path.exists(snippets_test_path): - session.run("py.test", "samples/snippets") + if os.path.exists(system_test_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_path, + *session.posargs, + ) + if os.path.exists(system_test_folder_path): + session.run( + "py.test", + "--verbose", + f"--junitxml=system_{session.python}_sponge_log.xml", + system_test_folder_path, + *session.posargs, + ) From adc73a6d8ce3f35de56c46a140e940bc63dcd23b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:34:11 +0000 Subject: [PATCH 2/5] feat: Add service_account_id output field to CloudSQL properties (#237) - [ ] Regenerate this pull request now. Clients can now observe the Service Account that is being used when connecting to the CloudSQL from the BigQuery. PiperOrigin-RevId: 463445598 Source-Link: https://github.com/googleapis/googleapis/commit/fe833ddc7356b404547de4d3c2495ef3881c25d0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73fad9a6502225fc64332b2f6fea8089cda6db55 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNmYWQ5YTY1MDIyMjVmYzY0MzMyYjJmNmZlYTgwODljZGE2ZGI1NSJ9 --- .../cloud/bigquery_connection_v1/types/connection.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/google/cloud/bigquery_connection_v1/types/connection.py b/google/cloud/bigquery_connection_v1/types/connection.py index 3f3a449..ff2a0e9 100644 --- a/google/cloud/bigquery_connection_v1/types/connection.py +++ b/google/cloud/bigquery_connection_v1/types/connection.py @@ -294,6 +294,14 @@ class CloudSqlProperties(proto.Message): Type of the Cloud SQL database. credential (google.cloud.bigquery_connection_v1.types.CloudSqlCredential): Input only. Cloud SQL credential. + service_account_id (str): + Output only. The account ID of the service + used for the purpose of this connection. + When the connection is used in the context of an + operation in BigQuery, this service account will + serve as identity being used for connecting to + the CloudSQL instance specified in this + connection. """ class DatabaseType(proto.Enum): @@ -320,6 +328,10 @@ class DatabaseType(proto.Enum): number=4, message="CloudSqlCredential", ) + service_account_id = proto.Field( + proto.STRING, + number=5, + ) class CloudSqlCredential(proto.Message): From ad17197e49d34ef933876d2c1926d2ee4ee206f8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 12:28:12 +0000 Subject: [PATCH 3/5] docs: deprecate the AwsCrossAccountRole property (#240) - [ ] Regenerate this pull request now. feat: add Azure Properties to Connection Azure properties are used by BigQuery Omni in Azure regions. PiperOrigin-RevId: 464570667 Source-Link: https://github.com/googleapis/googleapis/commit/75905af5ab6cd89c354dcfb9d9ca0bfdd4d581b4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8c3a2485bb35012ecb7a2ced0f94a11d2de253b2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGMzYTI0ODViYjM1MDEyZWNiN2EyY2VkMGY5NGExMWQyZGUyNTNiMiJ9 --- google/cloud/bigquery_connection/__init__.py | 2 + .../cloud/bigquery_connection_v1/__init__.py | 2 + .../bigquery_connection_v1/types/__init__.py | 2 + .../types/connection.py | 73 ++++++++++++++++++- 4 files changed, 78 insertions(+), 1 deletion(-) diff --git a/google/cloud/bigquery_connection/__init__.py b/google/cloud/bigquery_connection/__init__.py index 3b48bcc..03a4424 100644 --- a/google/cloud/bigquery_connection/__init__.py +++ b/google/cloud/bigquery_connection/__init__.py @@ -24,6 +24,7 @@ AwsAccessRole, AwsCrossAccountRole, AwsProperties, + AzureProperties, CloudResourceProperties, CloudSpannerProperties, CloudSqlCredential, @@ -43,6 +44,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "AzureProperties", "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", diff --git a/google/cloud/bigquery_connection_v1/__init__.py b/google/cloud/bigquery_connection_v1/__init__.py index 057bb6d..1893abc 100644 --- a/google/cloud/bigquery_connection_v1/__init__.py +++ b/google/cloud/bigquery_connection_v1/__init__.py @@ -22,6 +22,7 @@ AwsAccessRole, AwsCrossAccountRole, AwsProperties, + AzureProperties, CloudResourceProperties, CloudSpannerProperties, CloudSqlCredential, @@ -40,6 +41,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "AzureProperties", "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", diff --git a/google/cloud/bigquery_connection_v1/types/__init__.py b/google/cloud/bigquery_connection_v1/types/__init__.py index 4d07f1a..c24bc3e 100644 --- a/google/cloud/bigquery_connection_v1/types/__init__.py +++ b/google/cloud/bigquery_connection_v1/types/__init__.py @@ -17,6 +17,7 @@ AwsAccessRole, AwsCrossAccountRole, AwsProperties, + AzureProperties, CloudResourceProperties, CloudSpannerProperties, CloudSqlCredential, @@ -34,6 +35,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "AzureProperties", "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", diff --git a/google/cloud/bigquery_connection_v1/types/connection.py b/google/cloud/bigquery_connection_v1/types/connection.py index ff2a0e9..34572d7 100644 --- a/google/cloud/bigquery_connection_v1/types/connection.py +++ b/google/cloud/bigquery_connection_v1/types/connection.py @@ -32,6 +32,7 @@ "AwsProperties", "AwsCrossAccountRole", "AwsAccessRole", + "AzureProperties", "CloudResourceProperties", }, ) @@ -211,6 +212,10 @@ class Connection(proto.Message): aws (google.cloud.bigquery_connection_v1.types.AwsProperties): Amazon Web Services (AWS) properties. + This field is a member of `oneof`_ ``properties``. + azure (google.cloud.bigquery_connection_v1.types.AzureProperties): + Azure properties. + This field is a member of `oneof`_ ``properties``. cloud_spanner (google.cloud.bigquery_connection_v1.types.CloudSpannerProperties): Cloud Spanner properties. @@ -255,6 +260,12 @@ class Connection(proto.Message): oneof="properties", message="AwsProperties", ) + azure = proto.Field( + proto.MESSAGE, + number=11, + oneof="properties", + message="AzureProperties", + ) cloud_spanner = proto.Field( proto.MESSAGE, number=21, @@ -390,7 +401,7 @@ class AwsProperties(proto.Message): cross_account_role (google.cloud.bigquery_connection_v1.types.AwsCrossAccountRole): Authentication using Google owned AWS IAM user's access key to assume into customer's AWS - IAM Role. + IAM Role. Deprecated, do not use. This field is a member of `oneof`_ ``authentication_method``. access_role (google.cloud.bigquery_connection_v1.types.AwsAccessRole): @@ -472,6 +483,66 @@ class AwsAccessRole(proto.Message): ) +class AzureProperties(proto.Message): + r"""Container for connection properties specific to Azure. + + Attributes: + application (str): + Output only. The name of the Azure Active + Directory Application. + client_id (str): + Output only. The client id of the Azure + Active Directory Application. + object_id (str): + Output only. The object id of the Azure + Active Directory Application. + customer_tenant_id (str): + The id of customer's directory that host the + data. + redirect_uri (str): + The URL user will be redirected to after + granting consent during connection setup. + federated_application_client_id (str): + The client id of the user's Azure Active + Directory Application used for a federated + connection. + identity (str): + Output only. A unique Google-owned and + Google-generated identity for the Connection. + This identity will be used to access the user's + Azure Active Directory Application. + """ + + application = proto.Field( + proto.STRING, + number=1, + ) + client_id = proto.Field( + proto.STRING, + number=2, + ) + object_id = proto.Field( + proto.STRING, + number=3, + ) + customer_tenant_id = proto.Field( + proto.STRING, + number=4, + ) + redirect_uri = proto.Field( + proto.STRING, + number=5, + ) + federated_application_client_id = proto.Field( + proto.STRING, + number=6, + ) + identity = proto.Field( + proto.STRING, + number=7, + ) + + class CloudResourceProperties(proto.Message): r"""Container for connection properties for delegation of access to GCP resources. From 26f925f49ed3a9076e829d95bc8b9c7f30cd1e6f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 16:08:20 +0200 Subject: [PATCH 4/5] chore(deps): update all dependencies (#239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- samples/snippets/requirements-test.txt | 2 +- samples/snippets/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index 0719c92..18f53ca 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,2 +1,2 @@ pytest==7.1.2 -google-cloud-testutils==1.3.2 \ No newline at end of file +google-cloud-testutils==1.3.3 \ No newline at end of file diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index a001cd8..7e4e7ce 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-connection==1.5.0 \ No newline at end of file +google-cloud-bigquery-connection==1.6.0 \ No newline at end of file From e56ed4ad017df57da1dfe96bcf7a128346d35c82 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 20:38:13 +0000 Subject: [PATCH 5/5] chore(main): release 1.7.0 (#238) :robot: I have created a release *beep* *boop* --- ## [1.7.0](https://github.com/googleapis/python-bigquery-connection/compare/v1.6.0...v1.7.0) (2022-08-02) ### Features * Add service_account_id output field to CloudSQL properties ([#237](https://github.com/googleapis/python-bigquery-connection/issues/237)) ([adc73a6](https://github.com/googleapis/python-bigquery-connection/commit/adc73a6d8ce3f35de56c46a140e940bc63dcd23b)) ### Documentation * deprecate the AwsCrossAccountRole property ([#240](https://github.com/googleapis/python-bigquery-connection/issues/240)) ([ad17197](https://github.com/googleapis/python-bigquery-connection/commit/ad17197e49d34ef933876d2c1926d2ee4ee206f8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d54b4dc..43234d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.7.0](https://github.com/googleapis/python-bigquery-connection/compare/v1.6.0...v1.7.0) (2022-08-02) + + +### Features + +* Add service_account_id output field to CloudSQL properties ([#237](https://github.com/googleapis/python-bigquery-connection/issues/237)) ([adc73a6](https://github.com/googleapis/python-bigquery-connection/commit/adc73a6d8ce3f35de56c46a140e940bc63dcd23b)) + + +### Documentation + +* deprecate the AwsCrossAccountRole property ([#240](https://github.com/googleapis/python-bigquery-connection/issues/240)) ([ad17197](https://github.com/googleapis/python-bigquery-connection/commit/ad17197e49d34ef933876d2c1926d2ee4ee206f8)) + ## [1.6.0](https://github.com/googleapis/python-bigquery-connection/compare/v1.5.1...v1.6.0) (2022-07-16) diff --git a/setup.py b/setup.py index 4bdde39..97e3162 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import setuptools # type: ignore -version = "1.6.0" +version = "1.7.0" package_root = os.path.abspath(os.path.dirname(__file__))