Skip to content

Commit b5a8bd7

Browse files
committed
address feedback
1 parent 2643fd0 commit b5a8bd7

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

packages/gapic-generator/repositories.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def gapic_generator_python():
1616
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
1717
)
1818

19+
# Load gRPC v1.83.0 with temporary patch for legacy_channel.cc.
20+
# The fix is merged upstream (https://github.com/grpc/grpc/commit/816506e5c0434a42414af6955cc9eef0c562ff3a)
21+
# and this patch is temporary until released in a future gRPC release.
1922
_grpc_version = "1.83.0"
2023
_grpc_sha256 = "876ff5c9c26f364cd603531761268a5b58ccc1479afc78d6dab1d8e839da00c0"
2124
_maybe(
@@ -24,6 +27,9 @@ def gapic_generator_python():
2427
sha256 = _grpc_sha256,
2528
strip_prefix = "grpc-{}".format(_grpc_version),
2629
url = "https://github.com/grpc/grpc/archive/v{}.zip".format(_grpc_version),
30+
patch_cmds = [
31+
"python3 -c \"f='src/core/lib/surface/legacy_channel.cc'; c=open(f).read(); open(f,'w').write(c.replace('args.arena_init_function = arena_init_function;', 'if (arena_init_function.has_value()) { args.arena_init_function.emplace(*arena_init_function); }')) if 'args.arena_init_function = arena_init_function;' in c else None\""
32+
],
2733
)
2834

2935
_maybe(

packages/gapic-generator/rules_python_gapic/py_gapic.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def py_gapic_library(
8080
# to convert modern Starlark ProtoInfo into rules_gapic's expected CustomProtoInfo.
8181
# We extract and propagate 'testonly' from kwargs to prevent Bazel dependency analysis
8282
# errors when py_gapic_library or its input proto targets are marked testonly = True.
83-
testonly = kwargs.get("testonly", None)
83+
testonly = kwargs.get("testonly", False)
8484
compat_srcs = []
8585
for i, src in enumerate(srcs):
8686
compat_name = "%s_compat_src_%d" % (name, i)

0 commit comments

Comments
 (0)