Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Envoy to 12b3d2c2ffa582507e5d6dd34632b2b990f1b195 #376

Merged
merged 7 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ coverage --config=coverage
build:coverage --action_env=BAZEL_USE_LLVM_NATIVE_COVERAGE=1
build:coverage --action_env=GCOV=llvm-profdata
build:coverage --copt=-DNDEBUG
build:coverage --test_timeout=900
# 1.5x original timeout + 300s for trace merger in all categories
build:coverage --test_timeout=390,750,1500,5700
build:coverage --define=ENVOY_CONFIG_COVERAGE=1
build:coverage --cxxopt="-DENVOY_CONFIG_COVERAGE=1"
build:coverage --coverage_support=@envoy//bazel/coverage:coverage_support
Expand Down Expand Up @@ -188,7 +189,7 @@ build:remote-msan --config=rbe-toolchain-msan

# 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:04f06115b6ee7cfea74930353fb47a41149cbec3
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
references:
envoy-build-image: &envoy-build-image # Jan 9th, 2020
envoyproxy/envoy-build-ubuntu:04f06115b6ee7cfea74930353fb47a41149cbec3
envoy-build-image: &envoy-build-image # June 19th, 2020
envoyproxy/envoy-build-ubuntu:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
version: 2
jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -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'
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'

WarningsAsErrors: '*'

Expand Down
4 changes: 2 additions & 2 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

ENVOY_COMMIT = "b612236bcd8ef3cd14d904c21348888a6755d5d6" # June 14th, 2020
ENVOY_SHA = "3921cedea57380c75f9a97b046f6171cc21b15b2392aaa75f4c97e9adf48677c"
ENVOY_COMMIT = "7f251daa2e488587bc7335f91faceed420f162c4" # June 19th, 2020
ENVOY_SHA = "bc14914c9639eca9c5b2b09117b812796067c17c7f1d0d3f7ad622d554323d94"

HDR_HISTOGRAM_C_VERSION = "0.9.13" # Feb 22nd, 2020
HDR_HISTOGRAM_C_SHA = "2bd4a4631b64f2f8cf968ef49dd03ff3c51b487c3c98a01217ae4cf4a35b8310"
Expand Down
2 changes: 1 addition & 1 deletion source/client/factories_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ RequestSourcePtr
RequestSourceFactoryImpl::create(const Envoy::Upstream::ClusterManagerPtr& cluster_manager,
Envoy::Event::Dispatcher& dispatcher, Envoy::Stats::Scope& scope,
absl::string_view service_cluster_name) const {
Envoy::Http::RequestHeaderMapPtr header = std::make_unique<Envoy::Http::RequestHeaderMapImpl>();
Envoy::Http::RequestHeaderMapPtr header = Envoy::Http::RequestHeaderMapImpl::create();
if (options_.uri().has_value()) {
// We set headers based on the URI, but we don't have all the prerequisites to call the
// resolver to validate the address at this stage. Resolving is performed during a later stage
Expand Down
2 changes: 1 addition & 1 deletion source/client/service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void addHeader(envoy::api::v2::core::HeaderMap* map, absl::string_view key,
} // namespace

RequestSourcePtr RequestSourceServiceImpl::createStaticEmptyRequestSource(const uint32_t amount) {
Envoy::Http::RequestHeaderMapPtr header = std::make_unique<Envoy::Http::RequestHeaderMapImpl>();
Envoy::Http::RequestHeaderMapPtr header = Envoy::Http::RequestHeaderMapImpl::create();
header->addCopy(Envoy::Http::LowerCaseString("x-from-remote-request-source"), "1");
return std::make_unique<StaticRequestSourceImpl>(std::move(header), amount);
}
Expand Down
2 changes: 1 addition & 1 deletion source/client/stream_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void StreamDecoder::finalizeActiveSpan() {
}

void StreamDecoder::setupForTracing() {
auto headers_copy = std::make_unique<Envoy::Http::RequestHeaderMapImpl>();
Envoy::Http::RequestHeaderMapPtr headers_copy = Envoy::Http::RequestHeaderMapImpl::create();
Envoy::Http::HeaderMapImpl::copyFrom(*headers_copy, *request_headers_);
Envoy::Tracing::Decision tracing_decision = {Envoy::Tracing::Reason::ClientForced, true};
Envoy::Http::UUIDRequestIDExtension uuid_generator(random_generator_);
Expand Down
3 changes: 1 addition & 2 deletions source/common/rate_limiter_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ void ScheduledStartingRateLimiter::releaseOne() {
}

LinearRateLimiter::LinearRateLimiter(Envoy::TimeSource& time_source, const Frequency frequency)
: RateLimiterBaseImpl(time_source), acquireable_count_(0), acquired_count_(0),
frequency_(frequency) {
: RateLimiterBaseImpl(time_source), frequency_(frequency) {
if (frequency.value() <= 0) {
throw NighthawkException(fmt::format("frequency must be <= 0, value: {}", frequency.value()));
}
Expand Down
3 changes: 2 additions & 1 deletion source/common/request_stream_grpc_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void RequestStreamGrpcClientImpl::onRemoteClose(Envoy::Grpc::Status::GrpcStatus
RequestPtr ProtoRequestHelper::messageToRequest(
const Envoy::Http::RequestHeaderMap& base_header,
const nighthawk::request_source::RequestStreamResponse& message) {
auto header = std::make_shared<Envoy::Http::RequestHeaderMapImpl>();
std::shared_ptr<Envoy::Http::RequestHeaderMapImpl> header(
Envoy::Http::RequestHeaderMapImpl::create().release());
header->copyFrom(*header, base_header);
RequestPtr request = std::make_unique<RequestImpl>(header);

Expand Down
36 changes: 18 additions & 18 deletions test/benchmark_http_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,25 @@ TEST_F(BenchmarkClientHttpTest, StatusTrackingInOnComplete) {
std::make_unique<StreamingStatistic>(), std::make_unique<StreamingStatistic>(),
std::make_unique<StreamingStatistic>(), false, cluster_manager_, http_tracer_, "foo",
request_generator_, true);
Envoy::Http::ResponseHeaderMapImpl header;

header.setStatus(1);
client_->onComplete(true, header);
header.setStatus(100);
client_->onComplete(true, header);
header.setStatus(200);
client_->onComplete(true, header);
header.setStatus(300);
client_->onComplete(true, header);
header.setStatus(400);
client_->onComplete(true, header);
header.setStatus(500);
client_->onComplete(true, header);
header.setStatus(600);
client_->onComplete(true, header);
header.setStatus(200);
Envoy::Http::ResponseHeaderMapPtr header = Envoy::Http::ResponseHeaderMapImpl::create();

header->setStatus(1);
client_->onComplete(true, *header);
header->setStatus(100);
client_->onComplete(true, *header);
header->setStatus(200);
client_->onComplete(true, *header);
header->setStatus(300);
client_->onComplete(true, *header);
header->setStatus(400);
client_->onComplete(true, *header);
header->setStatus(500);
client_->onComplete(true, *header);
header->setStatus(600);
client_->onComplete(true, *header);
header->setStatus(200);
// Shouldn't be counted by status, should add to stream reset.
client_->onComplete(false, header);
client_->onComplete(false, *header);

EXPECT_EQ(1, getCounter("http_2xx"));
EXPECT_EQ(1, getCounter("http_3xx"));
Expand Down
2 changes: 1 addition & 1 deletion test/run_nighthawk_bazel_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ COVERAGE_VALUE=${COVERAGE_VALUE%?}
if [ "$VALIDATE_COVERAGE" == "true" ]
then
# TODO(#370): restore the coverage threshold.
COVERAGE_THRESHOLD=98.5
COVERAGE_THRESHOLD=98.4
COVERAGE_FAILED=$(echo "${COVERAGE_VALUE}<${COVERAGE_THRESHOLD}" | bc)
if test ${COVERAGE_FAILED} -eq 1; then
echo Code coverage ${COVERAGE_VALUE} is lower than limit of ${COVERAGE_THRESHOLD}
Expand Down
19 changes: 10 additions & 9 deletions test/server/http_test_server_filter_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ class HttpTestServerIntegrationTestBase : public Envoy::HttpIntegrationTest,
Envoy::Http::RequestEncoder& encoder = client.newStream(*response);
encoder.getStream().addCallbacks(*response);

Envoy::Http::RequestHeaderMapImpl headers;
headers.setMethod(method);
headers.setPath(url);
headers.setHost(host);
headers.setScheme(Envoy::Http::Headers::get().SchemeValues.Http);
auto headers = Envoy::Http::RequestHeaderMapImpl::create();
headers->setMethod(method);
headers->setPath(url);
headers->setHost(host);
headers->setScheme(Envoy::Http::Headers::get().SchemeValues.Http);
if (!content_type.empty()) {
headers.setContentType(content_type);
headers->setContentType(content_type);
}
request_header_delegate(headers);
encoder.encodeHeaders(headers, body.empty());
request_header_delegate(*headers);
encoder.encodeHeaders(*headers, body.empty());
if (!body.empty()) {
Envoy::Buffer::OwnedImpl body_buffer(body);
encoder.encodeData(body_buffer, true);
Expand Down Expand Up @@ -123,7 +123,8 @@ class HttpTestServerIntegrationTest : public HttpTestServerIntegrationTestBase {
void initialize() override {
config_helper_.addFilter(R"EOF(
name: test-server
config:
typed_config:
"@type": type.googleapis.com/nighthawk.server.ResponseOptions
response_body_size: 10
response_headers:
- { header: { key: "x-supplied-by", value: "nighthawk-test-server"} }
Expand Down
2 changes: 1 addition & 1 deletion test/stream_decoder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ TEST_F(StreamDecoderTest, TrailerTest) {
Envoy::Http::ResponseHeaderMapPtr headers{
new Envoy::Http::TestResponseHeaderMapImpl{{":status", "200"}}};
decoder->decodeHeaders(std::move(headers), false);
auto trailers = std::make_unique<Envoy::Http::ResponseTrailerMapImpl>();
Envoy::Http::ResponseTrailerMapPtr trailers = Envoy::Http::ResponseTrailerMapImpl::create();
decoder->decodeTrailers(std::move(trailers));
EXPECT_TRUE(is_complete);
EXPECT_EQ(1, stream_decoder_completion_callbacks_);
Expand Down