-
Notifications
You must be signed in to change notification settings - Fork 5.2k
deps: apply necessary changes for envoy_api MODULE without MODULE.bazel file #41835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| """Non-BCR dependencies for Envoy Data Plane API. | ||
|
|
||
| This extension provides repositories that are not available in Bazel Central Registry (BCR). | ||
| """ | ||
|
|
||
| load(":repositories.bzl", "api_dependencies") | ||
|
|
||
| def _non_module_deps_impl(module_ctx): | ||
| """Implementation for non_module_deps extension. | ||
|
|
||
| This extension calls api_dependencies(bzlmod=True) which creates repositories | ||
| not in BCR. It safely coexists with BCR deps because envoy_http_archive | ||
| checks native.existing_rules() before creating repositories. | ||
|
|
||
| Args: | ||
| module_ctx: Module extension context | ||
| """ | ||
| api_dependencies(bzlmod = True) | ||
|
|
||
| non_module_deps = module_extension( | ||
| implementation = _non_module_deps_impl, | ||
| doc = """ | ||
| Extension for Envoy API dependencies not available in BCR. | ||
|
|
||
| This extension creates the following repositories: | ||
| - prometheus_metrics_model: Prometheus client model | ||
| - com_github_chrusty_protoc_gen_jsonschema: Proto to JSON schema compiler | ||
| - envoy_toolshed: Tooling and libraries for Envoy development | ||
|
|
||
| For WORKSPACE mode, call api_dependencies() directly from WORKSPACE. | ||
| This extension should only be used in MODULE.bazel files. | ||
| """, | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,4 +166,22 @@ REPOSITORY_LOCATIONS_SPEC = dict( | |
| license = "Apache-2.0", | ||
| license_url = "https://github.com/google/cel-spec/blob/v{version}/LICENSE", | ||
| ), | ||
| envoy_toolshed = dict( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wondering if we should remove this from the main repository_locations.bzl - dependency relations between api <> envoy have always been a bit vague
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep in both places until it is clearly decided ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the downside of keeping two are that they need to be kept in sync and its confusing as to what is authoritative
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh - i see re modules - yeah was wondering how shared deps work in that context
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can it stay this way as first step toward bzlmod for envoy_api or shall I publish envoy_toolshed to be, then validate its working in data-plane-api PR then remove it here or do you have another strategy in mind ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i hadnt thought that far ahead - im happy to go with whatever strategy you think is best - if that means duplicating this dep for now - fine |
||
| project_name = "envoy_toolshed", | ||
| project_desc = "Tooling, libraries, runners and checkers for Envoy proxy's CI", | ||
| project_url = "https://github.com/envoyproxy/toolshed", | ||
| version = "0.3.5", | ||
| sha256 = "ec59fe6cf1432d33c0207e9f85bda3cbf653b54b3a16f3f94479b6cc8f3d1701", | ||
| strip_prefix = "toolshed-bazel-v{version}/bazel", | ||
| urls = ["https://github.com/envoyproxy/toolshed/archive/bazel-v{version}.tar.gz"], | ||
| use_category = ["build", "controlplane", "dataplane_core"], | ||
| implied_untracked_deps = [ | ||
| "tsan_libs", | ||
| "msan_libs", | ||
| ], | ||
| release_date = "2025-10-27", | ||
| cpe = "N/A", | ||
| license = "Apache-2.0", | ||
| license_url = "https://github.com/envoyproxy/toolshed/blob/bazel-v{version}/LICENSE", | ||
| ), | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about relative labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean ?
I took exactly what was provided here
Is something missing there ?