Skip to content

Add zlib_lib injection point to grpc 1.83.0.envoy patch - #156

Closed
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/add-zlib-lib-label-flag
Closed

phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/add-zlib-lib-label-flag

Conversation

Copilot AI commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

grpc's Envoy patch exposed ssl_lib and crypto_lib override points, but third_party:madler_zlib remained hard-wired to @zlib//:zlib. This prevented downstream consumers from redirecting grpc to their own zlib target and could pull both @zlib and @zlib-ng into the same build graph.

  • grpc patch

    • extend the existing third_party/BUILD patch in modules/grpc/1.83.0.envoy/patches/grpc.patch
    • add a new public label_flag:
      label_flag(
          name = "zlib_lib",
          build_setting_default = "@zlib//:zlib",
          visibility = ["//visibility:public"],
      )
    • repoint madler_zlib through that flag instead of the upstream hard-coded alias:
      alias(
          name = "madler_zlib",
          actual = ":zlib_lib",
          tags = ["manual"],
      )
  • registry metadata

    • update modules/grpc/1.83.0.envoy/source.json with the new grpc.patch integrity hash for the in-place patch edit
  • result

    • downstream builds can now override grpc's zlib binding with:
      build --@grpc//third_party:zlib_lib=@envoy//bazel:zlib
    • this matches the existing ssl/crypto injection model and removes the need for grpc to be pinned to the BCR @zlib target

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Add zlib_lib label_flag injection to grpc module patch Add zlib_lib injection point to grpc 1.83.0.envoy patch Sep 24, 2026
Copilot AI requested a review from phlax September 24, 2026 08:41
@phlax phlax closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants