From 3356f861accf24c744fcad58ce709891a3b8d770 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Mon, 22 Mar 2021 17:46:34 -0400 Subject: [PATCH] Update envoy to ff3b5e3 (March 22, 2021) Signed-off-by: Nathan Perry --- bazel/repositories.bzl | 4 ++-- source/adaptive_load/adaptive_load_client_main.cc | 4 +++- source/client/stream_decoder.cc | 5 ++++- test/process_test.cc | 4 +++- test/request_source/BUILD | 7 +++++++ test/service_test.cc | 3 +-- tools/check_format.sh | 2 +- 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index e35f2ea6a..f38d0fb75 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 = "031f75dd113e2f7be41b94a0365145e7bf1e6c12" # March 14th, 2021 -ENVOY_SHA = "20f5f98cc9a5c1ddd2c3de434b019273e3dbe02afe52396b90d74fab38dba4ba" +ENVOY_COMMIT = "ff3b5e3ce3f8916aab88b573678826e6fd95e01c" # March 22, 2021 +ENVOY_SHA = "683601fd7f003c50f8783b2d576f68d7c02d57c7ad123b88e6caf45cc3292dd9" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad" diff --git a/source/adaptive_load/adaptive_load_client_main.cc b/source/adaptive_load/adaptive_load_client_main.cc index 2dc578685..ccd9c7c94 100644 --- a/source/adaptive_load/adaptive_load_client_main.cc +++ b/source/adaptive_load/adaptive_load_client_main.cc @@ -39,7 +39,9 @@ namespace { */ void WriteFileOrThrow(Envoy::Filesystem::Instance& filesystem, absl::string_view path, absl::string_view contents) { - Envoy::Filesystem::FilePtr file = filesystem.createFile(std::string(path)); + Envoy::Filesystem::FilePathAndType file_path_and_type(Envoy::Filesystem::DestinationType::File, + path); + Envoy::Filesystem::FilePtr file = filesystem.createFile(file_path_and_type); const Envoy::Api::IoCallBoolResult open_result = file->open(((1 << Envoy::Filesystem::File::Operation::Write)) | (1 << (Envoy::Filesystem::File::Operation::Create))); diff --git a/source/client/stream_decoder.cc b/source/client/stream_decoder.cc index 5c7c1afb1..28ff80ca9 100644 --- a/source/client/stream_decoder.cc +++ b/source/client/stream_decoder.cc @@ -139,7 +139,8 @@ void StreamDecoder::onPoolReady(Envoy::Http::RequestEncoder& encoder, } } -// TODO(https://github.com/envoyproxy/nighthawk/issues/139): duplicated from the envoy code base. +// TODO(https://github.com/envoyproxy/nighthawk/issues/139): duplicated from +// envoy/source/common/router/router.cc Envoy::StreamInfo::ResponseFlag StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason reset_reason) { switch (reset_reason) { @@ -156,6 +157,8 @@ StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason re case Envoy::Http::StreamResetReason::RemoteReset: case Envoy::Http::StreamResetReason::RemoteRefusedStreamReset: return Envoy::StreamInfo::ResponseFlag::UpstreamRemoteReset; + case Envoy::Http::StreamResetReason::ProtocolError: + return Envoy::StreamInfo::ResponseFlag::UpstreamProtocolError; } NOT_REACHED_GCOVR_EXCL_LINE; } diff --git a/test/process_test.cc b/test/process_test.cc index 7d1191790..3b49916aa 100644 --- a/test/process_test.cc +++ b/test/process_test.cc @@ -245,7 +245,9 @@ TEST_P(ProcessTestWithSimTime, ScheduleAheadWorks) { ASSERT_EQ(output.results_size(), 1); EXPECT_EQ(Envoy::ProtobufUtil::TimeUtil::TimestampToNanoseconds( output.results()[0].execution_start()), - options_->scheduled_start().value().time_since_epoch().count()); + std::chrono::duration_cast( + options_->scheduled_start().value().time_since_epoch()) + .count()); }); } } diff --git a/test/request_source/BUILD b/test/request_source/BUILD index 9b1e6bf18..27f619734 100644 --- a/test/request_source/BUILD +++ b/test/request_source/BUILD @@ -9,6 +9,13 @@ licenses(["notice"]) # Apache 2 envoy_package() +filegroup( + name = "testdata", + srcs = [ + "test_data/test-config.yaml", + ], +) + envoy_cc_test_library( name = "stub_plugin_impl", srcs = [ diff --git a/test/service_test.cc b/test/service_test.cc index fd4ff39d8..3350d2dbb 100644 --- a/test/service_test.cc +++ b/test/service_test.cc @@ -206,8 +206,7 @@ TEST_P(ServiceTest, InvalidRps) { auto options = request_.mutable_start_request()->mutable_options(); options->mutable_requests_per_second()->set_value(0); // We do not expect output, because the options proto is not valid, and can't be echoed back. - runWithFailingValidationExpectations( - false, "CommandLineOptionsValidationError.RequestsPerSecond: [\"value must be inside range"); + runWithFailingValidationExpectations(false, "value must be inside range"); } // We didn't implement updates yet, ensure we indicate so. diff --git a/tools/check_format.sh b/tools/check_format.sh index 87045b961..3b4fcc1cb 100755 --- a/tools/check_format.sh +++ b/tools/check_format.sh @@ -5,7 +5,7 @@ set -e TO_CHECK="${2:-$PWD}" # TODO(https://github.com/envoyproxy/nighthawk/issues/165): fully excluding everything # from the build fixer isn't ideal. -bazel run @envoy//tools:code_format/check_format.py -- \ +bazel run @envoy//tools/code_format:check_format.py -- \ --skip_envoy_build_rule_check --namespace_check Nighthawk \ --build_fixer_check_excluded_paths=$(realpath ".") \ --include_dir_order envoy,nighthawk,external/source/envoy,external,api,common,source,exe,server,client,distributor,sink,grpcpp,request_source,test_common,test \