Skip to content

Commit

Permalink
feat: add retry config passed to bazel rule (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
software-dov authored Jul 16, 2020
1 parent 00ba77c commit 9e96151
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions rules_python_gapic/py_gapic.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,28 @@

load("@com_google_api_codegen//rules_gapic:gapic.bzl", "proto_custom_library")

def py_gapic_library(name, srcs, plugin_args = [], opt_args = [], **kwargs):
def py_gapic_library(
name,
srcs,
grpc_service_config = None,
plugin_args = [],
opt_args = [],
**kwargs):
# srcjar_target_name = "%s_srcjar" % name
srcjar_target_name = name
srcjar_output_suffix = ".srcjar"

file_args = {}
if grpc_service_config:
file_args[grpc_service_config] = "retry-config"

proto_
proto_custom_library(
name = srcjar_target_name,
deps = srcs,
plugin = Label("@gapic_generator_python//:gapic_plugin"),
plugin_args = plugin_args,
plugin_file_args = {},
plugin_file_args = file_args,
opt_args = opt_args,
output_type = "python_gapic",
output_suffix = srcjar_output_suffix,
Expand Down

0 comments on commit 9e96151

Please sign in to comment.