Skip to content

Comments

Add prometheus-metrics-model 0.6.2.envoy bzlmod module#3703

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/add-prometheus-metrics-model-module
Draft

Add prometheus-metrics-model 0.6.2.envoy bzlmod module#3703
Copilot wants to merge 6 commits intomainfrom
copilot/add-prometheus-metrics-model-module

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Adds bzlmod registry entry for Envoy's prometheus_metrics_model dependency. The upstream prometheus/client_model v0.6.2 lacks Bazel support, requiring an overlay.

Target naming

Replicates Envoy's api_cc_py_proto_library(name="X") macro convention:

proto_library(
    name = "client_model",              # Base name - for proto_library deps
    srcs = ["io/prometheus/client/metrics.proto"],
    deps = ["@protobuf//:timestamp_proto"],  # Public alias, not //src/google/protobuf path
)

cc_proto_library(
    name = "client_model_cc_proto",     # Suffix added - for cc_library deps
    deps = [":client_model"],
)

This naming allows Envoy API's proto_library to depend on our proto_library (requires ProtoInfo provider) while C++ consumers can use the cc_proto_library.

Protobuf well-known types

References @protobuf//:timestamp_proto (public alias) instead of @protobuf//src/google/protobuf:timestamp_proto (restricted visibility).

Module structure

  • prometheus-metrics-model version 0.6.2.envoy
  • Repo name: prometheus_metrics_model
  • Depends on: protobuf 33.4.envoy
  • Provides backward compatibility aliases for alternative target names
Original prompt

Create a PR in envoyproxy/toolshed adding a new bzlmod module to the toolshed bazel-registry for Envoy’s dependency on Prometheus metrics model.

Context:

  • Envoy repo (envoyproxy/envoy) has an external dep prometheus_metrics_model in api/bazel/repository_locations.bzl.
  • We need a toolshed bazel-registry entry for this dependency.

Requirements (user-specified):

  • Module name MUST be prometheus-metrics-model (note hyphens).
  • Module version MUST be 0.6.2.envoy.
  • Create a PR (not just a suggestion).
  • Use overlay/ rather than patch files.
  • Don’t add an unnecessary nested MODULE.bazel (i.e., do not create extra MODULE.bazel files beyond what the toolshed registry standard expects; the module should use the one from the version root).
  • Follow existing toolshed registry formatting standards.

Upstream source details (from Envoy’s repository_locations.bzl for prometheus_metrics_model):

Implementation guidance:

  • Add new directory under bazel-registry/modules/prometheus-metrics-model/0.6.2.envoy/.
  • Include the minimal required registry metadata files used by toolshed (e.g., MODULE.bazel, source.json, any metadata.json if required by toolshed standards).
  • If upstream source doesn’t provide Bazel module metadata or needs Bazel build files, add them under overlay/ in the version directory, as per toolshed standards.
  • Ensure registry entry is consistent with other modules in toolshed (naming, formatting, bazel compatibility fields if required, compatibility_level conventions, etc.).
  • Ensure MODULE.bazel at the version root declares module(name = "prometheus-metrics-model", version = "0.6.2.envoy", ...) and any required bazel_dep(...) entries. Avoid adding extra nested MODULE.bazel files unless the standard overlay approach requires it; user explicitly requests no unnecessary extra MODULE.bazel.

Deliverable:

  • Open a PR in envoyproxy/toolshed with these changes.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit e485717
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/69846949d5c47e0009dafd5e
😎 Deploy Preview https://deploy-preview-3703--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI and others added 2 commits February 5, 2026 09:30
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new bzlmod module for Prometheus metrics model Add prometheus-metrics-model 0.6.2.envoy to bazel-registry Feb 5, 2026
Copilot AI requested a review from phlax February 5, 2026 09:33
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title Add prometheus-metrics-model 0.6.2.envoy to bazel-registry Fix protobuf well-known type visibility in prometheus-metrics-model Feb 5, 2026
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title Fix protobuf well-known type visibility in prometheus-metrics-model Add prometheus-metrics-model 0.6.2.envoy to bazel-registry Feb 5, 2026
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title Add prometheus-metrics-model 0.6.2.envoy to bazel-registry Add prometheus-metrics-model 0.6.2.envoy bzlmod module Feb 5, 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