Skip to content

Commit

Permalink
api config: add build rules for go protos (#7987)
Browse files Browse the repository at this point in the history
Some BUILD files are missing build rules to generate go protos. envoyproxy/go-control-plane depends on these protos, so they should be exposed publicly. Added build rules to generate *.pb.go files.

Risk Level: Low
Testing: These rules were copied to google3 and tested internally. Unfortunately, I am having a bit of trouble with bazel build directly on these targets ("Package is considered deleted due to --deleted_packages"). Please let me know if there is a better way to test this change.

Signed-off-by: Teju Nareddy <nareddyt@google.com>
  • Loading branch information
nareddyt authored and htuch committed Aug 22, 2019
1 parent 719245f commit c7110f8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion api/envoy/config/accesslog/v2/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal")
load("@envoy_api//bazel:api_build_system.bzl", "api_go_proto_library", "api_proto_library_internal")

licenses(["notice"]) # Apache 2

Expand All @@ -14,3 +14,9 @@ api_proto_library_internal(
name = "file",
srcs = ["file.proto"],
)

api_go_proto_library(
name = "als",
proto = ":als",
deps = ["//envoy/api/v2/core:grpc_service_go_proto"],
)
12 changes: 11 additions & 1 deletion api/envoy/config/filter/network/tcp_proxy/v2/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal")
load("@envoy_api//bazel:api_build_system.bzl", "api_go_proto_library", "api_proto_library_internal")

licenses(["notice"]) # Apache 2

Expand All @@ -11,3 +11,13 @@ api_proto_library_internal(
"//envoy/config/filter/accesslog/v2:accesslog",
],
)

api_go_proto_library(
name = "tcp_proxy",
proto = ":tcp_proxy",
deps = [
"//envoy/api/v2/core:address_go_proto",
"//envoy/api/v2/core:base_go_proto",
"//envoy/config/filter/accesslog/v2:accesslog_go_proto",
],
)

0 comments on commit c7110f8

Please sign in to comment.