diff --git a/.bazelrc b/.bazelrc index a0bfbcb421d..ffdf878d706 100644 --- a/.bazelrc +++ b/.bazelrc @@ -19,6 +19,7 @@ build:asan --define tcmalloc=disabled build:asan --build_tag_filters=-no_asan build:asan --test_tag_filters=-no_asan build:asan --define signal_trace=disabled +build:asan --test_env=ASAN_OPTIONS=detect_odr_violation=1 # Clang 5.0 ASAN build:clang-asan --define ENVOY_CONFIG_ASAN=1 @@ -36,6 +37,7 @@ build:clang-asan --test_tag_filters=-no_asan build:clang-asan --define signal_trace=disabled build:clang-asan --test_env=ASAN_SYMBOLIZER_PATH build:clang-asan --linkopt -fuse-ld=lld +build:clang-asan --test_env=ASAN_OPTIONS=detect_odr_violation=1 # Clang 5.0 TSAN build:clang-tsan --define ENVOY_CONFIG_TSAN=1 @@ -43,6 +45,8 @@ build:clang-tsan --copt -fsanitize=thread build:clang-tsan --linkopt -fsanitize=thread build:clang-tsan --define tcmalloc=disabled build:clang-tsan --linkopt -fuse-ld=lld +# Needed due to https://github.com/libevent/libevent/issues/777 +build:clang-tsan --copt -DEVENT__DISABLE_DEBUG_MODE # Clang 5.0 MSAN - broken today since we need to rebuild lib[std]c++ and external deps with MSAN # support (see https://github.com/envoyproxy/envoy/issues/443). diff --git a/.circleci/config.yml b/.circleci/config.yml index 5731eb3c377..c628a9c9fad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,16 +71,18 @@ jobs: - /home/circleci/.cache/bazel macos: macos: - xcode: "9.3.0" + xcode: "9.3.1" environment: - BAZEL_STARTUP_ARGS: "--output_base /Users/distiller/.cache/bazel" - - BAZEL_BUILD_ARGS: "--local_resources=12288,5,1" - - BAZEL_TEST_ARGS: "--test_env=ENVOY_IP_TEST_VERSIONS=v4only --test_output=all --local_resources=12288,5,1 --local_test_jobs=8" + - BAZEL_BUILD_ARGS: "--local_resources=12288,5,1 --incompatible_bzl_disallow_load_after_statement=false" + - BAZEL_TEST_ARGS: "--test_env=ENVOY_IP_TEST_VERSIONS=v4only --test_output=all --local_resources=12288,5,1 --local_test_jobs=8 --incompatible_bzl_disallow_load_after_statement=false" - CC: clang - CXX: clang++ steps: - run: sudo ntpdate -vu time.apple.com - - run: brew install bazel cmake coreutils go libtool ninja wget + - run: brew tap bazelbuild/tap + - run: brew tap-pin bazelbuild/tap + - run: brew install bazelbuild/tap/bazel cmake coreutils go libtool ninja wget - checkout - restore_cache: keys: diff --git a/Makefile b/Makefile index bf1fe3d6e36..24e6c39ad3e 100644 --- a/Makefile +++ b/Makefile @@ -33,30 +33,25 @@ CXX := clang++-7 endif PATH := /usr/lib/llvm-7/bin:$(PATH) +# Removed '@bazel shutdown' as it is causing CircleCI to hang build: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_TARGETS) - @bazel shutdown # Build only envoy - fast build_envoy: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) //src/envoy:envoy - @bazel shutdown clean: @bazel clean - @bazel shutdown test: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) $(BAZEL_TARGETS) - @bazel shutdown test_asan: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-asan -- $(BAZEL_TARGETS) $(SANITIZER_EXCLUSIONS) - @bazel shutdown test_tsan: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-tsan -- $(BAZEL_TARGETS) $(SANITIZER_EXCLUSIONS) - @bazel shutdown check: @script/check-license-headers @@ -68,7 +63,6 @@ artifacts: build deb: CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) //tools/deb:istio-proxy - @bazel shutdown .PHONY: build clean test check artifacts diff --git a/WORKSPACE b/WORKSPACE index 1b230222fa7..e7e17129c71 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -35,9 +35,9 @@ bind( # When updating envoy sha manually please update the sha in istio.deps file also # # Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/COMMIT.tar.gz && sha256sum COMMIT.tar.gz` -ENVOY_SHA = "5ea1a0c1cb506ed3e80d52b572b0f767f55f9f39" +ENVOY_SHA = "a79164f50f55cfd02f0516eeb693c8fee18e0f90" -ENVOY_SHA256 = "64beeb27f68ed644ff0bd37b193e5a85f49b883250940e292f6f150ec7173e38" +ENVOY_SHA256 = "f8a36c0f84ccf1f651ed7a8c3941a9b821bc035be4ceecefda3f50853064800e" http_archive( name = "envoy", diff --git a/istio.deps b/istio.deps index ee025b4b7cc..793ad967786 100644 --- a/istio.deps +++ b/istio.deps @@ -11,6 +11,6 @@ "name": "ENVOY_SHA", "repoName": "envoyproxy/envoy", "file": "WORKSPACE", - "lastStableSHA": "5ea1a0c1cb506ed3e80d52b572b0f767f55f9f39" + "lastStableSHA": "a79164f50f55cfd02f0516eeb693c8fee18e0f90" } -] \ No newline at end of file +] diff --git a/test/integration/BUILD b/test/integration/BUILD index af70546752d..be2666462b6 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -18,6 +18,7 @@ package(default_visibility = ["//visibility:public"]) load( "@envoy//bazel:envoy_build_system.bzl", + "envoy_cc_platform_dep", "envoy_cc_test", "envoy_cc_test_library", ) @@ -36,7 +37,7 @@ envoy_cc_test_library( deps = [ "@envoy//source/server:server_lib", "@envoy//test/integration:http_protocol_integration_lib", - ], + ] + envoy_cc_platform_dep("@envoy//source/exe:platform_impl_lib"), ) envoy_cc_test( diff --git a/test/integration/int_client.cc b/test/integration/int_client.cc index 6447ec128f3..d2c2342957e 100644 --- a/test/integration/int_client.cc +++ b/test/integration/int_client.cc @@ -447,7 +447,8 @@ Client::Client(const std::string &name) stats_(), thread_(nullptr), time_system_(), - api_(Envoy::Thread::ThreadFactorySingleton::get(), stats_, time_system_, + platform_impl_(), + api_(platform_impl_.threadFactory(), stats_, time_system_, Envoy::Filesystem::fileSystemForTest()), dispatcher_{api_.allocateDispatcher()} {} diff --git a/test/integration/int_client.h b/test/integration/int_client.h index 2a243c98784..fa619b18a0a 100644 --- a/test/integration/int_client.h +++ b/test/integration/int_client.h @@ -25,6 +25,7 @@ #include "envoy/http/codec.h" #include "envoy/network/address.h" #include "envoy/thread/thread.h" +#include "exe/platform_impl.h" #include "fmt/printf.h" #include "test/test_common/test_time.h" #include "test/test_common/utility.h" @@ -226,6 +227,7 @@ class Client : Envoy::Logger::Loggable { Envoy::Stats::IsolatedStoreImpl stats_; Envoy::Thread::ThreadPtr thread_; Envoy::Event::TestRealTimeSystem time_system_; + Envoy::PlatformImpl platform_impl_; Envoy::Api::Impl api_; std::shared_ptr dispatcher_; @@ -313,4 +315,4 @@ class LoadGenerator : Envoy::Logger::Loggable { typedef std::unique_ptr LoadGeneratorPtr; } // namespace Integration -} // namespace Mixer \ No newline at end of file +} // namespace Mixer diff --git a/test/integration/int_server.cc b/test/integration/int_server.cc index e5a7416bec5..1b1aec9d934 100644 --- a/test/integration/int_server.cc +++ b/test/integration/int_server.cc @@ -612,7 +612,8 @@ Server::Server(const std::string &name, : name_(name), stats_(), time_system_(), - api_(Envoy::Thread::ThreadFactorySingleton::get(), stats_, time_system_, + platform_impl_(), + api_(platform_impl_.threadFactory(), stats_, time_system_, Envoy::Filesystem::fileSystemForTest()), dispatcher_(api_.allocateDispatcher()), connection_handler_(new Envoy::Server::ConnectionHandlerImpl( diff --git a/test/integration/int_server.h b/test/integration/int_server.h index 2e2789b84c2..9532f0e6a7a 100644 --- a/test/integration/int_server.h +++ b/test/integration/int_server.h @@ -20,6 +20,7 @@ #include "common/http/codec_client.h" #include "common/network/listen_socket_impl.h" #include "common/stats/isolated_store_impl.h" +#include "exe/platform_impl.h" #include "test/test_common/test_time.h" #include "test/test_common/utility.h" @@ -384,6 +385,7 @@ class Server : public Envoy::Network::FilterChainManager, std::string name_; Envoy::Stats::IsolatedStoreImpl stats_; Envoy::Event::TestRealTimeSystem time_system_; + Envoy::PlatformImpl platform_impl_; Envoy::Api::Impl api_; Envoy::Event::DispatcherPtr dispatcher_; Envoy::Network::ConnectionHandlerPtr connection_handler_;