Skip to content

Commit d393b64

Browse files
authored
feat: add retry config passed to bazel rule (#526)
1 parent 8f0ab5e commit d393b64

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

packages/gapic-generator/rules_python_gapic/py_gapic.bzl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,28 @@
1414

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

17-
def py_gapic_library(name, srcs, plugin_args = [], opt_args = [], **kwargs):
17+
def py_gapic_library(
18+
name,
19+
srcs,
20+
grpc_service_config = None,
21+
plugin_args = [],
22+
opt_args = [],
23+
**kwargs):
1824
# srcjar_target_name = "%s_srcjar" % name
1925
srcjar_target_name = name
2026
srcjar_output_suffix = ".srcjar"
2127

28+
file_args = {}
29+
if grpc_service_config:
30+
file_args[grpc_service_config] = "retry-config"
31+
32+
proto_
2233
proto_custom_library(
2334
name = srcjar_target_name,
2435
deps = srcs,
2536
plugin = Label("@gapic_generator_python//:gapic_plugin"),
2637
plugin_args = plugin_args,
27-
plugin_file_args = {},
38+
plugin_file_args = file_args,
2839
opt_args = opt_args,
2940
output_type = "python_gapic",
3041
output_suffix = srcjar_output_suffix,

0 commit comments

Comments
 (0)