Publish envoy-api Bazel module to toolshed registry#3709
Draft
Publish envoy-api Bazel module to toolshed registry#3709
Conversation
✅ Deploy Preview for nifty-bassi-e26446 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add metadata.json for envoy-api module - Add source.json with computed integrity hash - Add MODULE.bazel with envoy_toolshed and prometheus-metrics-model as proper bazel_dep entries - Only com_github_chrusty_protoc_gen_jsonschema remains in non_module_deps extension Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Publish envoy-api Bazel module in toolshed registry
Publish envoy-api Bazel module to toolshed registry
Feb 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publishes the
envoy-apiBazel module to the toolshed registry, enabling envoy's bzlmod migration without depending on BCR's Google-maintainedenvoy_apimodule. Prerequisite for envoyproxy/envoy#43329.Module Configuration
1.38.0-dev5151379e36c8c9373de231b8ff07abda1d524ea9withstrip_prefixtoapi/subdirectorysha256-4VVmTR1nJo0se/gnna0UabDtOw6KHVbpo7vcAaXtNSw=envoy-apiwithrepo_name = "envoy_api"for backward compatibilityKey Dependencies
Migrated to proper
bazel_depentries (previously non-module deps):envoy_toolshed@0.3.26prometheus-metrics-model@0.6.2.envoywithrepo_name = "prometheus_metrics_model"Retained in
non_module_depsextension:com_github_chrusty_protoc_gen_jsonschema(abandonware, will be removed eventually)Files Added
Original prompt
Summary
Publish the
envoy-apiBazel module in the toolshed registry so that envoy can use it via bzlmod without depending on the BCRenvoy_apimodule (which is out of envoyproxy's control).This is a prerequisite for envoyproxy/envoy#43329 which enables bzlmod in envoy.
Context
The envoy repo currently uses a
local_path_overridefor theenvoy-apimodule (pointing atapi/). For external consumers building envoy as a dependency, theenvoy-apimodule needs to be resolvable from a registry. Publishing it in the toolshed registry (which envoy already uses via--registry) gives envoyproxy full control over it.The BCR has an
envoy_apibut it's published by Google and doesn't align with envoy's needs. The toolshed registry already hosts 60+ custom.envoymodules.What to create
Create the following files under
bazel-registry/modules/envoy-api/:1.
bazel-registry/modules/envoy-api/metadata.json{ "homepage": "https://github.com/envoyproxy/envoy/tree/main/api", "maintainers": [], "repository": [ "github:envoyproxy/envoy" ], "versions": [ "1.38.0-dev" ], "yanked_versions": {} }2.
bazel-registry/modules/envoy-api/1.38.0-dev/source.json{ "url": "https://github.com/envoyproxy/envoy/archive/5151379e36c8c9373de231b8ff07abda1d524ea9.tar.gz", "integrity": "", "strip_prefix": "envoy-5151379e36c8c9373de231b8ff07abda1d524ea9/api" }IMPORTANT: The
integrityfield needs to be computed. Download the tarball fromhttps://github.com/envoyproxy/envoy/archive/5151379e36c8c9373de231b8ff07abda1d524ea9.tar.gz, compute its SHA256 hash, and encode it as a base64 SRI hash in the formatsha256-<base64hash>=. You can do this with:Or:
3.
bazel-registry/modules/envoy-api/1.38.0-dev/MODULE.bazelThis is based on the
api/MODULE.bazelfrom thephlax:bzlmod-enablebranch of envoy (https://github.com/phlax/envoy/blob/bzlmod-enable/api/MODULE.bazel), but with key changes:envoy_toolshedmust be a properbazel_dep(NOT fetched via thenon_module_depsextension). It's already in the toolshed registry. Use version0.3.26to match the version used in envoy's MODULE.bazel.prometheus-metrics-modelmust be a properbazel_dep(NOT fetched via thenon_module_depsextension). It's already in the toolshed registry at version0.6.2.envoywithrepo_name = "prometheus_metrics_model".com_github_chrusty_protoc_gen_jsonschemastays as a non-module dep via thenon_module_depsextension (it's abandonware, will be ripped out eventually).non_module_depsextension should ONLY providecom_github_chrusty_protoc_gen_jsonschema(notenvoy_toolshedorprometheus_metrics_model).Here is the MODULE.bazel content: