diff --git a/.bazelrc b/.bazelrc index 23ca82ff4..9139ec35b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -28,6 +28,7 @@ build --enable_platform_specific_config # Enable position independent code, this option is not supported on Windows and default on on macOS. build:linux --copt=-fPIC +build:linux --cxxopt=-std=c++17 # We already have absl in the build, define absl=1 to tell googletest to use absl for backtrace. build --define absl=1 @@ -71,6 +72,7 @@ build:clang-asan --config=asan build:clang-asan --linkopt -fuse-ld=lld # macOS ASAN/UBSAN +build:macos --cxxopt=-std=c++17 build:macos-asan --config=asan # Workaround, see https://github.com/bazelbuild/bazel/issues/6932 build:macos-asan --copt -Wno-macro-redefined @@ -87,6 +89,8 @@ build:clang-tsan --define ENVOY_CONFIG_TSAN=1 build:clang-tsan --copt -fsanitize=thread build:clang-tsan --linkopt -fsanitize=thread build:clang-tsan --linkopt -fuse-ld=lld +build:clang-tsan --build_tag_filters=-no_san,-no_tsan +build:clang-tsan --test_tag_filters=-no_san,-no_tsan # Needed due to https://github.com/libevent/libevent/issues/777 build:clang-tsan --copt -DEVENT__DISABLE_DEBUG_MODE @@ -163,6 +167,10 @@ build:rbe-toolchain-msan --linkopt=-L/opt/libcxx_msan/lib build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib build:rbe-toolchain-msan --config=clang-msan +build:rbe-toolchain-tsan --linkopt=-L/opt/libcxx_tsan/lib +build:rbe-toolchain-tsan --linkopt=-Wl,-rpath,/opt/libcxx_tsan/lib +build:rbe-toolchain-tsan --config=clang-tsan + build:rbe-toolchain-gcc --config=rbe-toolchain build:rbe-toolchain-gcc --platforms=@rbe_ubuntu_gcc//config:platform build:rbe-toolchain-gcc --host_platform=@rbe_ubuntu_gcc//config:platform @@ -209,7 +217,7 @@ build:remote-msvc-cl --config=rbe-toolchain-msvc-cl # Docker sandbox # NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L8 -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:f21773ab398a879f976936f72c78c9dd3718ca1e +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:736b8db2e1f0b55edb50719d2f8ddf383f46030b build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker @@ -231,6 +239,10 @@ build:docker-msan --config=docker-sandbox build:docker-msan --config=rbe-toolchain-clang-libc++ build:docker-msan --config=rbe-toolchain-msan +build:docker-tsan --config=docker-sandbox +build:docker-tsan --config=rbe-toolchain-clang-libc++ +build:docker-tsan --config=rbe-toolchain-tsan + # CI configurations build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com @@ -269,6 +281,7 @@ build:windows --define manual_stamp=manual_stamp build:windows --copt="-DCARES_STATICLIB" build:windows --copt="-DNGHTTP2_STATICLIB" build:windows --copt="-DCURL_STATICLIB" +build:windows --cxxopt="/std:c++17" # Required to work around build defects on Windows MSVC cl # Unguarded gcc pragmas in quiche are not recognized by MSVC @@ -298,4 +311,4 @@ build:windows --features=static_link_msvcrt build:windows --dynamic_mode=off try-import %workspace%/clang.bazelrc -try-import %workspace%/user.bazelrc \ No newline at end of file +try-import %workspace%/user.bazelrc diff --git a/.bazelversion b/.bazelversion index fd2a01863..bea438e9a 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -3.1.0 +3.3.1 diff --git a/.circleci/config.yml b/.circleci/config.yml index 505a8ff5b..59262e25e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ references: - envoy-build-image: &envoy-build-image # July 1st, 2020 - envoyproxy/envoy-build-ubuntu:f21773ab398a879f976936f72c78c9dd3718ca1e + envoy-build-image: &envoy-build-image # July 17th, 2020 + envoyproxy/envoy-build-ubuntu:736b8db2e1f0b55edb50719d2f8ddf383f46030b version: 2 jobs: build: diff --git a/.clang-tidy b/.clang-tidy index 02fb4a4af..f945af6a1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -Checks: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,modernize-*,performance-*,readability-redundant-*,readability-braces-around-statements,-abseil-no-internal-dependencies,-modernize-use-trailing-return-type,-modernize-avoid-bind' +Checks: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,modernize-*,performance-*,readability-redundant-*,readability-braces-around-statements,-abseil-no-internal-dependencies,-modernize-use-trailing-return-type,-modernize-avoid-bind,-modernize-use-nodiscard,-modernize-concat-nested-namespaces' WarningsAsErrors: '*' diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index ed06d2f7b..7071412de 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "7abb0e0bbed4f6b6304403b93762614ad385f80d" # July 14th, 2020 -ENVOY_SHA = "13fd08f9478e3dee5289581eb8f5f85dfc53fa5ac21555e0e86af536e5a200d8" +ENVOY_COMMIT = "13da8f415c372e7fde3b0105f58f57348e84acb5" # July 17th, 2020 +ENVOY_SHA = "525307fb73125c8c6e4ce4761c9f09b781cd7b7602a8711afe07be45ad55de52" HDR_HISTOGRAM_C_VERSION = "0.11.0" # July 14th, 2020 HDR_HISTOGRAM_C_SHA = "c00696b3d81776675aa2bc62d3642e31bd8a48cc9619c9bd7d4a78762896e353" diff --git a/source/client/service_impl.cc b/source/client/service_impl.cc index b7076bebc..693955a79 100644 --- a/source/client/service_impl.cc +++ b/source/client/service_impl.cc @@ -145,14 +145,11 @@ ::grpc::Status RequestSourceServiceImpl::RequestStream( nighthawk::request_source::RequestStreamResponse response; auto* request_specifier = response.mutable_request_specifier(); auto* request_headers = request_specifier->mutable_headers(); - headers->iterate( - [](const Envoy::Http::HeaderEntry& header, - void* context) -> Envoy::Http::RequestHeaderMap::Iterate { - addHeader(static_cast(context), - header.key().getStringView(), header.value().getStringView()); - return Envoy::Http::RequestHeaderMap::Iterate::Continue; - }, - request_headers); + headers->iterate([&request_headers](const Envoy::Http::HeaderEntry& header) + -> Envoy::Http::HeaderMap::Iterate { + addHeader(request_headers, header.key().getStringView(), header.value().getStringView()); + return Envoy::Http::RequestHeaderMap::Iterate::Continue; + }); // TODO(oschaaf): add static configuration for other fields plus expectations ok = ok && stream->Write(response); }