Conversation
Signed-off-by: GitHub <noreply@github.com> Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com> Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix benchmark dependency resolution for downstream repos
bazel: resolve benchmark deps for downstream bzlmod consumers
Sep 20, 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.
Envoy’s benchmark macros were resolving
@benchmarkinside Envoy’s repo mapping, which breaks for downstream bzlmod consumers becausegoogle_benchmarkremains adev_dependencyand is absent when Envoy is not the root module. This change keeps the dependency dev-only in Envoy, adds an external regression target, and shifts benchmark resolution to the caller’s module mapping.Why this change
envoy_cc_benchmark_binarycould not build benchmarks unless Envoy promotedgoogle_benchmarkto a non-dev dep.google_benchmarkthemselves.External regression coverage
bazel/tests/external/that consumes Envoy as an external module.google_benchmarkin the external test module and added the new benchmark target to the external CI build path.Benchmark target split
//test/benchmark:maininto:main_lib: Envoy-owned support deps onlymain: the in-tree benchmark target that still links@benchmarkand@tclapmain.ccso the benchmark main can be compiled from the caller context.Macro behavior change
envoy_cc_benchmark_binaryandenvoy_cc_benchmark_dyn_module_binaryto:repositoryparametersrcsparameter and appendLabel("//test/benchmark:main.cc")Label("//test/benchmark:main_lib")@benchmarkand@tclapas plain string labels so they resolve in the caller’s repo mapping@benchmarkdo not pick it up twice.Downstream contract
envoy_cc_benchmark_binarymust declare:Example
with the downstream module declaring: