From 1dc139d74bda9ab71aa8160eb548933cf3d56862 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 21 Sep 2021 09:51:39 -0700 Subject: [PATCH] chore: update gapic-generator-csharp to 1.3.10 chore: update rules_gapic to 0.7.0 feat: rules `csharp_proto_library` and `csharp_grpc_library` are now sourced from `rules_gapic` (instead of `gapic-generator-csharp`). chore: re-enabled C# build rules for BigQuery/v2 and BigQuery/Connection/v1beta1 Committer: @virost PiperOrigin-RevId: 398018488 --- WORKSPACE | 18 ++++--- .../bigquery/connection/v1beta1/BUILD.bazel | 48 ++++++++----------- google/cloud/bigquery/v2/BUILD.bazel | 48 ++++++++----------- repository_rules.bzl | 4 +- 4 files changed, 53 insertions(+), 65 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 494683c553a0d..75057a934d5bf 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -120,10 +120,12 @@ go_register_toolchains() gazelle_dependencies() -_rules_gapic_version = "0.6.3" +_rules_gapic_version = "0.7.0" +_rules_gapic_sha256 = "3536ddd6d03b80733fd4dbde98d9f5be784dc0a38aba14ad2f7ac2e0209a15f8" http_archive( name = "rules_gapic", + sha256 = _rules_gapic_sha256, strip_prefix = "rules_gapic-%s" % _rules_gapic_version, urls = ["https://github.com/googleapis/rules_gapic/archive/v%s.tar.gz" % _rules_gapic_version], ) @@ -144,10 +146,14 @@ rules_gapic_repositories() # for most of the other languages as well, so they can be considered as the core cross-language # dependencies. +_grpc_version = "1.39.1" +_grpc_sha256 = "4608e92cf528b625888cc874a5d21c78923322dc8c66d2c4c146134efbac69bc" + http_archive( name = "com_github_grpc_grpc", - strip_prefix = "grpc-1.36.4", - urls = ["https://github.com/grpc/grpc/archive/v1.36.4.zip"], + sha256 = _grpc_sha256, + strip_prefix = "grpc-%s" % _grpc_version , + urls = ["https://github.com/grpc/grpc/archive/v%s.zip" % _grpc_version], ) load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") @@ -324,7 +330,6 @@ gapic_generator_php_repositories() # Required to access the C#-specific common resources config. _gax_dotnet_version = "Google.Api.Gax-3.3.0" - _gax_dotnet_sha256 = "c4d31345a226987e8551cb81afa685c9322d3f806077d9f02011676cf00c15d9" http_archive( @@ -335,9 +340,8 @@ http_archive( urls = ["https://github.com/googleapis/gax-dotnet/archive/refs/tags/%s.tar.gz" % _gax_dotnet_version], ) -_gapic_generator_csharp_version = "1.3.8" - -_gapic_generator_csharp_sha256 = "a1ddbdfe296f8668aeba7e484c69ed0ae274bffd2b1f4c8a2ccb33aad12db707" +_gapic_generator_csharp_version = "1.3.10" +_gapic_generator_csharp_sha256 = "a2c62bfc66f48a6524358c45fac0471bf86a9b405d238e20845aff8bf5fddd25" http_archive( name = "gapic_generator_csharp", diff --git a/google/cloud/bigquery/connection/v1beta1/BUILD.bazel b/google/cloud/bigquery/connection/v1beta1/BUILD.bazel index d26c895b4f30b..0eb9726b6bd73 100644 --- a/google/cloud/bigquery/connection/v1beta1/BUILD.bazel +++ b/google/cloud/bigquery/connection/v1beta1/BUILD.bazel @@ -298,34 +298,26 @@ csharp_grpc_library( deps = [":connection_csharp_proto"], ) -## -# [2021-09-17, virost] Disabled this pending investigation because -# the pagination in the ListConnections methods plays havoc with the -# pagination detection in the generator. -# Likely because the type is google.protobuf.UInt32Value -# -# This is for v1beta1 (unpublished for C#), v1 is unaffected -# -# csharp_gapic_library( -# name = "connection_csharp_gapic", -# srcs = [":connection_proto_with_info"], -# common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", -# grpc_service_config = "bigqueryconnection_grpc_service_config.json", -# deps = [ -# ":connection_csharp_grpc", -# ":connection_csharp_proto", -# ], -# ) - -# # Open Source Packages -# csharp_gapic_assembly_pkg( -# name = "google-cloud-bigquery-connection-v1beta1-csharp", -# deps = [ -# ":connection_csharp_gapic", -# ":connection_csharp_grpc", -# ":connection_csharp_proto", -# ], -# ) +csharp_gapic_library( + name = "connection_csharp_gapic", + srcs = [":connection_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "bigqueryconnection_grpc_service_config.json", + deps = [ + ":connection_csharp_grpc", + ":connection_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-connection-v1beta1-csharp", + deps = [ + ":connection_csharp_gapic", + ":connection_csharp_grpc", + ":connection_csharp_proto", + ], +) ############################################################################## # C++ diff --git a/google/cloud/bigquery/v2/BUILD.bazel b/google/cloud/bigquery/v2/BUILD.bazel index afff84fa5707a..4c10ff57f34dc 100644 --- a/google/cloud/bigquery/v2/BUILD.bazel +++ b/google/cloud/bigquery/v2/BUILD.bazel @@ -297,34 +297,26 @@ csharp_grpc_library( deps = [":bigquery_csharp_proto"], ) -## -# [2021-09-17, virost] Disabled this pending investigation because -# the pagination in the ListModels methods plays havoc with the -# pagination detection in the generator because the type -# is google.protobuf.UInt32Value -# -# This is published, so it will be resolved with the next generator update. -# -# csharp_gapic_library( -# name = "bigquery_csharp_gapic", -# srcs = [":bigquery_proto_with_info"], -# common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", -# grpc_service_config = "bigquery_grpc_service_config.json", -# deps = [ -# ":bigquery_csharp_grpc", -# ":bigquery_csharp_proto", -# ], -# ) - -# # Open Source Packages -# csharp_gapic_assembly_pkg( -# name = "google-cloud-bigquery-v2-csharp", -# deps = [ -# ":bigquery_csharp_gapic", -# ":bigquery_csharp_grpc", -# ":bigquery_csharp_proto", -# ], -# ) +csharp_gapic_library( + name = "bigquery_csharp_gapic", + srcs = [":bigquery_proto_with_info"], + common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", + grpc_service_config = "bigquery_grpc_service_config.json", + deps = [ + ":bigquery_csharp_grpc", + ":bigquery_csharp_proto", + ], +) + +# Open Source Packages +csharp_gapic_assembly_pkg( + name = "google-cloud-bigquery-v2-csharp", + deps = [ + ":bigquery_csharp_gapic", + ":bigquery_csharp_grpc", + ":bigquery_csharp_proto", + ], +) ############################################################################## # C++ diff --git a/repository_rules.bzl b/repository_rules.bzl index 155f1cf785f66..40df6198b5c66 100644 --- a/repository_rules.bzl +++ b/repository_rules.bzl @@ -271,11 +271,11 @@ def switched_rules_by_language( # rules["csharp_proto_library"] = _switch( csharp, - "@gapic_generator_csharp//rules_csharp_gapic:csharp_gapic.bzl", + "@rules_gapic//csharp:csharp_gapic.bzl", ) rules["csharp_grpc_library"] = _switch( csharp and grpc, - "@gapic_generator_csharp//rules_csharp_gapic:csharp_gapic.bzl", + "@rules_gapic//csharp:csharp_gapic.bzl", ) rules["csharp_gapic_library"] = _switch( csharp and grpc and gapic,