Skip to content

Commit

Permalink
Update Envoy-WASM SHA to latest. (istio#2481)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora authored and istio-testing committed Oct 22, 2019
1 parent 6051c04 commit 8b185f0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
8 changes: 3 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ build:asan --define ENVOY_CONFIG_ASAN=1
build:asan --copt -fsanitize=address,undefined
build:asan --linkopt -fsanitize=address,undefined
# TODO(lizan): vptr and function requires C++ UBSAN runtime which we're not currently linking to.
# Enable them when bazel has better support for that.
build:asan --copt -fno-sanitize=vptr
build:asan --linkopt -fno-sanitize=vptr
build:asan --copt -fno-sanitize=function
build:asan --linkopt -fno-sanitize=function
# Enable them when bazel has better support for that or with explicit linker options.
build:asan --copt -fno-sanitize=vptr,function
build:asan --linkopt -fno-sanitize=vptr,function
build:asan --copt -DADDRESS_SANITIZER=1
build:asan --copt -D__SANITIZE_ADDRESS__
build:asan --test_env=ASAN_OPTIONS=handle_abort=1:allow_addr2line=true:check_initialization_order=true:strict_init_order=true:detect_odr_violation=1
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ bind(
# 1. Determine SHA256 `wget https://github.com/envoyproxy/envoy-wasm/archive/$COMMIT.tar.gz && sha256sum $COMMIT.tar.gz`
# 2. Update .bazelrc and .bazelversion files.
#
# envoy-wasm commit date: 10/17/2019
ENVOY_SHA = "c5aed9360a0fb1e6791e4a660e87fdd2a1b4cc62"
# envoy-wasm commit date: 10/22/2019
ENVOY_SHA = "4e5f460901f1a3ece8b0b24ed2ece0f70ed2092e"

ENVOY_SHA256 = "1e089262e7c3c4cc591210352a49c59d3ab58eb8236d38a38d42d16d9b1cbd30"
ENVOY_SHA256 = "5c98510e3eaa53bda00ec5d31b195558d5971123e118205250735500619f1b63"

LOCAL_ENVOY_PROJECT = "/PATH/TO/ENVOY"

Expand Down
4 changes: 2 additions & 2 deletions extensions/metadata_exchange/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ all: plugin.wasm

%.wasm %.wat: %.cc ${CPP_API}/proxy_wasm_intrinsics.h ${CPP_API}/proxy_wasm_enums.h ${CPP_API}/proxy_wasm_externs.h ${CPP_API}/proxy_wasm_api.h ${CPP_API}/proxy_wasm_intrinsics.js ${CPP_CONTEXT_LIB}
protoc extensions/common/node_info.proto --cpp_out=.
em++ -s WASM=1 -s BINARYEN_TRAP_MODE='clamp' -s LEGALIZE_JS_FFI=0 -s EMIT_EMSCRIPTEN_METADATA=1 --std=c++17 -O3 -g3 -I${CPP_API} -I${CPP_API}/google/protobuf -I../../extensions/common -I. -I/usr/local/include -I${ABSL} --js-library ${CPP_API}/proxy_wasm_intrinsics.js ${ABSL_CPP} $*.cc ${CPP_API}/proxy_wasm_intrinsics.pb.cc ${PROTO_SRCS} ${COMMON_SRCS} ${CPP_CONTEXT_LIB} ${CPP_API}/libprotobuf.bc -o $*.js
rm -f $*.js $*.wast
em++ -s STANDALONE_WASM=1 -s EMIT_EMSCRIPTEN_METADATA=1 --std=c++17 -O3 -I${CPP_API} -I${CPP_API}/google/protobuf -I../../extensions/common -I. -I/usr/local/include -I${ABSL} --js-library ${CPP_API}/proxy_wasm_intrinsics.js ${ABSL_CPP} $*.cc ${CPP_API}/proxy_wasm_intrinsics.pb.cc ${PROTO_SRCS} ${COMMON_SRCS} ${CPP_CONTEXT_LIB} ${CPP_API}/libprotobuf.a -o $*.wasm
rm -f $*.wast
rm -f extensions/common/node_info.pb.*
chown ${uid}.${gid} $^
2 changes: 1 addition & 1 deletion extensions/metadata_exchange/build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v1 bash /build_wasm.sh
docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v2 bash /build_wasm.sh
rmdir extensions
4 changes: 2 additions & 2 deletions extensions/stats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ all: plugin.wasm
%.wasm %.wat: %.cc ${CPP_API}/proxy_wasm_intrinsics.h ${CPP_API}/proxy_wasm_enums.h ${CPP_API}/proxy_wasm_externs.h ${CPP_API}/proxy_wasm_api.h ${CPP_API}/proxy_wasm_intrinsics.js ${CPP_CONTEXT_LIB}
protoc extensions/common/node_info.proto --cpp_out=.
protoc config.proto --cpp_out=.
em++ -s WASM=1 -s BINARYEN_TRAP_MODE='clamp' -s LEGALIZE_JS_FFI=0 -s EMIT_EMSCRIPTEN_METADATA=1 --std=c++17 -O3 -g3 -I${CPP_API} -I${CPP_API}/google/protobuf -Iextensions/common -I. -I/usr/local/include -I${ABSL} -I. --js-library ${CPP_API}/proxy_wasm_intrinsics.js $*.cc ${CPP_API}/proxy_wasm_intrinsics.pb.cc ${PROTO_SRCS} ${COMMON_SRCS} ${CPP_CONTEXT_LIB} ${ABSL_CPP} ${CPP_API}/libprotobuf.bc -o $*.js
rm -f $*.js $*.wast
em++ -s STANDALONE_WASM=1 -s EMIT_EMSCRIPTEN_METADATA=1 --std=c++17 -O3 -I${CPP_API} -I${CPP_API}/google/protobuf -Iextensions/common -I. -I/usr/local/include -I${ABSL} -I. --js-library ${CPP_API}/proxy_wasm_intrinsics.js $*.cc ${CPP_API}/proxy_wasm_intrinsics.pb.cc ${PROTO_SRCS} ${COMMON_SRCS} ${CPP_CONTEXT_LIB} ${ABSL_CPP} ${CPP_API}/libprotobuf.a -o $*.wasm
rm -f $*.wast
rm -f extensions/common/node_info.pb.* extensions/stats/config.pb.*
chown ${uid}.${gid} $^
2 changes: 1 addition & 1 deletion extensions/stats/build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v1 bash /build_wasm.sh
docker run -e uid="$(id -u)" -e gid="$(id -g)" -v $PWD:/work -w /work -v $(realpath $PWD/../../extensions):/work/extensions gcr.io/istio-testing/wasmsdk:v2 bash /build_wasm.sh
rmdir extensions
3 changes: 2 additions & 1 deletion src/envoy/http/mixer/filter_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class MixerConfigFactory : public NamedHttpFilterConfigFactory {
Router::RouteSpecificFilterConfigConstSharedPtr
createRouteSpecificFilterConfig(
const Protobuf::Message& config,
Envoy::Server::Configuration::FactoryContext&) override {
Server::Configuration::ServerFactoryContext&,
ProtobufMessage::ValidationVisitor&) override {
auto obj = std::make_shared<Http::Mixer::PerRouteServiceConfig>();
// TODO: use downcastAndValidate once client_config.proto adds validate
// rules.
Expand Down

0 comments on commit 8b185f0

Please sign in to comment.