envoyproxy/envoy-filter-example

Build errors - include/registry dependency & exe:envoy_main_lib ref

msample opened this issue · 5 comments

Building master with given README.md instructions inside the lyft/envoy-build:latest container fails with:

ERROR: /code/envoy-filter-example/BUILD:33:1: no such package '@envoy//include/envoy/registry': BUILD file not found on package path and referenced by '//:echo2_config'.
ERROR: /code/envoy-filter-example/BUILD:10:1: no such target '@envoy//source/exe:envoy_main_lib': target 'envoy_main_lib' not declared in package 'source/exe' (did you mean 'envoy_common_lib'?) defined by /root/.cache/bazel/_bazel_root/10680e8ee3273e72f1d320dfcf6be48e/external/envoy/source/exe/BUILD and referenced by '//:envoy'.
ERROR: Analysis of target '//:envoy' failed; build aborted.

Works if update ./BUILD's envoy_cc_binary to depend on "@envoy//source/exe:envoy_main_entry_lib" instead "@envoy//source/exe:envoy_main_lib" and bump envoy git submodule to tip of master.

htuch commented

Thanks @msample for the update. Do you want to put together a PR for this?

@dnoe I think this was your change. Not sure how CI continues to work, I thought we only override WORKSPACE but use the master BUILD.

Hope that PR fits the bill. On the subject of customizing envoy like this example - will it scale? I'm guessing there will be many additional custom filters (e.g. istio/envoy). Seems like it would be easier to bootstrap that ecosystem by defining a 'contrib' format that could be pulled into the main lyft/envoy project and configured - or do we just need a LUA scripting filter ;) ?

@msample if you want to discuss contrib/experimental type workflow in main repo please open an issue there and we can discuss.

dnoe commented

The PR looks good. I'm also confused why the CI didn't catch this - the change to main entry point went in a few weeks ago so it's passed many many times since then. I'll look into it.

dnoe commented

The reason why it was not caught is that the CI steps run all the tests in envoy-filter-example but do not actually build main (and main is not a dependency of the tests). I'll create a PR to also build the Envoy executable from envoy-filter-example as part of the CI steps.