envoyproxy / envoy-filter-example

Example of consuming Envoy and adding a custom filter
332 stars 206 forks source link

envoy-filter-example build failed #155

Closed bryanwux closed 2 years ago

bryanwux commented 2 years ago

I got the following failure message when I build envoy-filter-example with latest envoy.

ERROR: --platform_mappings was set to 'bazel/platform_mappings' but no such file exists relative to the package path roots, '[/root/envoy-filter-example]'
INFO: Elapsed time: 7.780s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (2 packages loaded)

When I look into this, I find this recently merged PR https://github.com/envoyproxy/envoy/pull/20813 causes this issue because envoy-filter-example/bazel/platform_mappings is missing while this file is needed by envoy-filter-example/envoy/.bazelrc by build --platform_mappings=bazel/platform_mappings.

So I suggest add platform_mappings to avoid this build failure.

phlax commented 2 years ago

it looks like this should be set up for the filter example:


$ git grep platform_mapp
.bazelrc:build --platform_mappings=bazel/platform_mappings
ci/filter_example_setup.sh:ln -sf "${ENVOY_SRCDIR}"/bazel/platform_mappings "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/bazel/

not sure why it is failing to build in your env

cc @keith

bryanwux commented 2 years ago

it looks like this should be set up for the filter example:

$ git grep platform_mapp
.bazelrc:build --platform_mappings=bazel/platform_mappings
ci/filter_example_setup.sh:ln -sf "${ENVOY_SRCDIR}"/bazel/platform_mappings "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/bazel/

not sure why it is failing to build in your env

cc @keith

To reproduce this issue:

cd ~/envoy-filter-example
git submodule update --init
bazel build //http-filter-example:envoy

I am not sure why the symlink is not working.

keith commented 2 years ago

https://github.com/envoyproxy/envoy-filter-example/pull/157

alecholmez commented 2 years ago

One way to fix this is by just sym link envoy/bazel

I got around it that way. Similar to how the .devcontainer is linked

mkauf commented 2 years ago

Another way to fix this bug:

ln -s ../envoy/bazel/platform_mappings bazel/platform_mappings