From 0aca65093d3b31a682ca9052de3f3f1c0247afb0 Mon Sep 17 00:00:00 2001 From: Otto van der Schaaf Date: Mon, 13 Jul 2020 14:26:31 +0200 Subject: [PATCH 1/3] Update Envoy to 84affaad1173a1e48bbee5b3049c305a555eb3b2 Also, run gcc-built tests in CI because now we can. Fixes #382 ----- Prerequisite: https://github.com/envoyproxy/envoy/pull/12057 Signed-off-by: Otto van der Schaaf --- .bazelrc | 13 ++++++++----- bazel/repositories.bzl | 4 ++-- ci/do_ci.sh | 4 +--- source/client/BUILD | 1 + source/client/benchmark_client_impl.h | 3 ++- source/client/process_impl.h | 3 ++- source/client/stream_decoder.h | 5 +++-- source/server/README.md | 10 +--------- test/BUILD | 1 + test/benchmark_http_client_test.cc | 3 ++- test/client_worker_test.cc | 3 ++- test/stream_decoder_test.cc | 4 ++-- test/worker_test.cc | 3 ++- 13 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.bazelrc b/.bazelrc index f80346d54..23ca82ff4 100644 --- a/.bazelrc +++ b/.bazelrc @@ -134,23 +134,24 @@ build:coverage --strategy=CoverageReport=sandboxed,local build:coverage --experimental_use_llvm_covmap build:coverage --collect_code_coverage build:coverage --test_tag_filters=-nocoverage -build:coverage --instrumentation_filter="//source(?!/common/chromium_url|/extensions/quic_listeners/quiche/platform)[/:],//include[/:]" -coverage:test-coverage --test_arg="--log-path /dev/null" +build:coverage --instrumentation_filter="//source(?!/extensions/quic_listeners/quiche/platform)[/:],//include[/:]" coverage:test-coverage --test_arg="-l trace" -coverage:fuzz-coverage --config=asan-fuzzer +coverage:fuzz-coverage --config=plain-fuzzer coverage:fuzz-coverage --run_under=@envoy//bazel/coverage:fuzz_coverage_wrapper.sh # Remote execution: https://docs.bazel.build/versions/master/remote-execution.html -build:rbe-toolchain --host_platform=@envoy_build_tools//toolchains:rbe_ubuntu_clang_platform -build:rbe-toolchain --platforms=@envoy_build_tools//toolchains:rbe_ubuntu_clang_platform build:rbe-toolchain --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build:rbe-toolchain-clang --config=rbe-toolchain +build:rbe-toolchain-clang --platforms=@rbe_ubuntu_clang//config:platform +build:rbe-toolchain-clang --host_platform=@rbe_ubuntu_clang//config:platform build:rbe-toolchain-clang --crosstool_top=@rbe_ubuntu_clang//cc:toolchain build:rbe-toolchain-clang --extra_toolchains=@rbe_ubuntu_clang//config:cc-toolchain build:rbe-toolchain-clang --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin build:rbe-toolchain-clang-libc++ --config=rbe-toolchain +build:rbe-toolchain-clang-libc++ --platforms=@rbe_ubuntu_clang_libcxx//config:platform +build:rbe-toolchain-clang-libc++ --host_platform=@rbe_ubuntu_clang_libcxx//config:platform build:rbe-toolchain-clang-libc++ --crosstool_top=@rbe_ubuntu_clang_libcxx//cc:toolchain build:rbe-toolchain-clang-libc++ --extra_toolchains=@rbe_ubuntu_clang_libcxx//config:cc-toolchain build:rbe-toolchain-clang-libc++ --action_env=CC=clang --action_env=CXX=clang++ --action_env=PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin @@ -163,6 +164,8 @@ build:rbe-toolchain-msan --linkopt=-Wl,-rpath,/opt/libcxx_msan/lib build:rbe-toolchain-msan --config=clang-msan 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 build:rbe-toolchain-gcc --crosstool_top=@rbe_ubuntu_gcc//cc:toolchain build:rbe-toolchain-gcc --extra_toolchains=@rbe_ubuntu_gcc//config:cc-toolchain diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index c3dc11867..8f7750a40 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 = "f6b86a58b264b46a57d71a9b3b0989b2969df408" # July 2nd, 2020 -ENVOY_SHA = "5c802266f0cdc5193b6e0247a0f5f20f39f6cc36b688b194e60a853148ba438a" +ENVOY_COMMIT = "84affaad1173a1e48bbee5b3049c305a555eb3b2" # July 13th, 2020 +ENVOY_SHA = "df6c0853bbeaf3e36a4db9a5ccbf74a9cff9e436ed52a39aa0d683700a90e4f5" HDR_HISTOGRAM_C_VERSION = "0.9.13" # Feb 22nd, 2020 HDR_HISTOGRAM_C_SHA = "2bd4a4631b64f2f8cf968ef49dd03ff3c51b487c3c98a01217ae4cf4a35b8310" diff --git a/ci/do_ci.sh b/ci/do_ci.sh index ce17ca080..92658d437 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -214,9 +214,7 @@ case "$1" in ;; test_gcc) setup_gcc_toolchain - # TODO(#362): change the line below to do_test once the upstream merges - # https://github.com/envoyproxy/envoy/pull/10236 - do_build + do_test exit 0 ;; clang_tidy) diff --git a/source/client/BUILD b/source/client/BUILD index e61a60beb..19c7ecda1 100644 --- a/source/client/BUILD +++ b/source/client/BUILD @@ -46,6 +46,7 @@ envoy_cc_library( "//include/nighthawk/common:base_includes", "//source/common:request_source_impl_lib", "//source/common:nighthawk_common_lib", + "@envoy//source/common/common:random_generator_lib_with_external_headers", "@envoy//source/common/access_log:access_log_manager_lib_with_external_headers", "@envoy//source/common/api:api_lib_with_external_headers", "@envoy//source/common/common:cleanup_lib_with_external_headers", diff --git a/source/client/benchmark_client_impl.h b/source/client/benchmark_client_impl.h index a40e90a19..e835f58f3 100644 --- a/source/client/benchmark_client_impl.h +++ b/source/client/benchmark_client_impl.h @@ -15,6 +15,7 @@ #include "nighthawk/common/statistic.h" #include "external/envoy/source/common/common/logger.h" +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/http/http1/conn_pool.h" #include "external/envoy/source/common/http/http2/conn_pool.h" #include "external/envoy/source/common/runtime/runtime_impl.h" @@ -129,7 +130,7 @@ class BenchmarkClientHttpImpl : public BenchmarkClient, uint32_t max_active_requests_{UINT32_MAX}; uint32_t max_requests_per_connection_{UINT32_MAX}; Envoy::Event::TimerPtr timer_; - Envoy::Runtime::RandomGeneratorImpl generator_; + Envoy::Random::RandomGeneratorImpl generator_; uint64_t requests_completed_{}; uint64_t requests_initiated_{}; bool measure_latencies_{}; diff --git a/source/client/process_impl.h b/source/client/process_impl.h index 11d265fb8..ebb41990d 100644 --- a/source/client/process_impl.h +++ b/source/client/process_impl.h @@ -16,6 +16,7 @@ #include "external/envoy/source/common/access_log/access_log_manager_impl.h" #include "external/envoy/source/common/common/logger.h" +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/event/real_time_system.h" #include "external/envoy/source/common/grpc/context_impl.h" #include "external/envoy/source/common/http/context_impl.h" @@ -133,7 +134,7 @@ class ProcessImpl : public Process, public Envoy::Logger::Loggable] [--use-fake-symbol-table ] [--cpuset-threads] [--enable-mutex-tracing] -[--disable-hot-restart] -[--max-obj-name-len ] -[--max-stats ] [--mode +[--disable-hot-restart] [--mode ] [--parent-shutdown-time-s ] [--drain-strategy ] [--drain-time-s ] @@ -193,12 +191,6 @@ Enable mutex contention tracing functionality --disable-hot-restart Disable hot restart functionality ---max-obj-name-len -Deprecated and unused; please do not specify. - ---max-stats -Deprecated and unused; please do not specify. - --mode One of 'serve' (default; validate configs and then serve traffic normally) or 'validate' (validate configs and exit). diff --git a/test/BUILD b/test/BUILD index 868394027..421b6f557 100644 --- a/test/BUILD +++ b/test/BUILD @@ -238,6 +238,7 @@ envoy_cc_test( repository = "@envoy", deps = [ "//source/common:nighthawk_common_lib", + "@envoy//source/common/common:random_generator_lib_with_external_headers", "@envoy//source/common/stats:isolated_store_lib_with_external_headers", "@envoy//test/mocks/local_info:local_info_mocks", "@envoy//test/mocks/protobuf:protobuf_mocks", diff --git a/test/benchmark_http_client_test.cc b/test/benchmark_http_client_test.cc index 0539f487b..f6d67efe2 100644 --- a/test/benchmark_http_client_test.cc +++ b/test/benchmark_http_client_test.cc @@ -1,5 +1,6 @@ #include +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/http/header_map_impl.h" #include "external/envoy/source/common/network/utility.h" #include "external/envoy/source/common/runtime/runtime_impl.h" @@ -146,7 +147,7 @@ class BenchmarkClientHttpTest : public Test { Envoy::Stats::IsolatedStoreImpl store_; Envoy::Api::ApiPtr api_; Envoy::Event::DispatcherPtr dispatcher_; - Envoy::Runtime::RandomGeneratorImpl generator_; + Envoy::Random::RandomGeneratorImpl generator_; NiceMock tls_; NiceMock runtime_; std::unique_ptr client_; diff --git a/test/client_worker_test.cc b/test/client_worker_test.cc index 4a7b59517..c2a7a9dae 100644 --- a/test/client_worker_test.cc +++ b/test/client_worker_test.cc @@ -3,6 +3,7 @@ #include "envoy/upstream/cluster_manager.h" +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/runtime/runtime_impl.h" #include "external/envoy/source/common/stats/isolated_store_impl.h" #include "external/envoy/test/mocks/local_info/mocks.h" @@ -90,7 +91,7 @@ class ClientWorkerTest : public Test { MockBenchmarkClient* benchmark_client_; MockSequencer* sequencer_; MockRequestSource* request_generator_; - Envoy::Runtime::RandomGeneratorImpl rand_; + Envoy::Random::RandomGeneratorImpl rand_; NiceMock dispatcher_; std::unique_ptr loader_; NiceMock local_info_; diff --git a/test/stream_decoder_test.cc b/test/stream_decoder_test.cc index 93cb5333f..a18cabc10 100644 --- a/test/stream_decoder_test.cc +++ b/test/stream_decoder_test.cc @@ -1,9 +1,9 @@ #include +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/event/dispatcher_impl.h" #include "external/envoy/source/common/http/header_map_impl.h" #include "external/envoy/source/common/network/utility.h" -#include "external/envoy/source/common/runtime/runtime_impl.h" #include "external/envoy/source/common/stats/isolated_store_impl.h" #include "external/envoy/test/mocks/http/mocks.h" #include "external/envoy/test/mocks/stream_info/mocks.h" @@ -49,7 +49,7 @@ class StreamDecoderTest : public Test, public StreamDecoderCompletionCallback { HeaderMapPtr request_headers_; uint64_t stream_decoder_completion_callbacks_{0}; uint64_t pool_failures_{0}; - Envoy::Runtime::RandomGeneratorImpl random_generator_; + Envoy::Random::RandomGeneratorImpl random_generator_; Envoy::Tracing::HttpTracerSharedPtr http_tracer_; Envoy::Http::ResponseHeaderMapPtr test_header_; Envoy::Http::ResponseTrailerMapPtr test_trailer_; diff --git a/test/worker_test.cc b/test/worker_test.cc index 30263f0af..c30a8b323 100644 --- a/test/worker_test.cc +++ b/test/worker_test.cc @@ -1,5 +1,6 @@ #include +#include "external/envoy/source/common/common/random_generator.h" #include "external/envoy/source/common/runtime/runtime_impl.h" #include "external/envoy/source/common/stats/isolated_store_impl.h" #include "external/envoy/test/mocks/local_info/mocks.h" @@ -36,7 +37,7 @@ class WorkerTest : public Test { Envoy::Api::ApiPtr api_; Envoy::ThreadLocal::MockInstance tls_; Envoy::Stats::IsolatedStoreImpl test_store_; - Envoy::Runtime::RandomGeneratorImpl rand_; + Envoy::Random::RandomGeneratorImpl rand_; NiceMock local_info_; NiceMock validation_visitor_; }; From 4cf528a00bec548815157a4a46a28c79136d0ee7 Mon Sep 17 00:00:00 2001 From: Otto van der Schaaf Date: Tue, 14 Jul 2020 11:10:41 +0200 Subject: [PATCH 2/3] Update Envoy to f481e9de7b4754611a7613d8bd9a4a8f146812ec Signed-off-by: Otto van der Schaaf --- bazel/repositories.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 8f7750a40..c381abebe 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 = "84affaad1173a1e48bbee5b3049c305a555eb3b2" # July 13th, 2020 -ENVOY_SHA = "df6c0853bbeaf3e36a4db9a5ccbf74a9cff9e436ed52a39aa0d683700a90e4f5" +ENVOY_COMMIT = "f481e9de7b4754611a7613d8bd9a4a8f146812ec" # July 14th, 2020 +ENVOY_SHA = "44142dda6fbcebd9b1e62f8c27746cb700db83c871f561de61107d1c360f45ec" HDR_HISTOGRAM_C_VERSION = "0.9.13" # Feb 22nd, 2020 HDR_HISTOGRAM_C_SHA = "2bd4a4631b64f2f8cf968ef49dd03ff3c51b487c3c98a01217ae4cf4a35b8310" From 55a575f212f931c88a6e44f975a04833c41dd960 Mon Sep 17 00:00:00 2001 From: Otto van der Schaaf Date: Tue, 14 Jul 2020 23:23:41 +0200 Subject: [PATCH 3/3] Update Envoy to 7abb0e0bbed4f6b6304403b93762614ad385f80d Signed-off-by: Otto van der Schaaf --- bazel/repositories.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index c381abebe..e35ffb93b 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 = "f481e9de7b4754611a7613d8bd9a4a8f146812ec" # July 14th, 2020 -ENVOY_SHA = "44142dda6fbcebd9b1e62f8c27746cb700db83c871f561de61107d1c360f45ec" +ENVOY_COMMIT = "7abb0e0bbed4f6b6304403b93762614ad385f80d" # July 14th, 2020 +ENVOY_SHA = "13fd08f9478e3dee5289581eb8f5f85dfc53fa5ac21555e0e86af536e5a200d8" HDR_HISTOGRAM_C_VERSION = "0.9.13" # Feb 22nd, 2020 HDR_HISTOGRAM_C_SHA = "2bd4a4631b64f2f8cf968ef49dd03ff3c51b487c3c98a01217ae4cf4a35b8310"