Skip to content
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
25 changes: 20 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@ 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 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).
# Clang MSAN - this is the base config for remote-msan and docker-msan. To run this config without
# our build image, follow https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
# with libc++ instruction and provide corresponding `--copt` and `--linkopt` as well.
build:clang-msan --action_env=ENVOY_MSAN=1
build:clang-msan --config=sanitizer
build:clang-msan --define ENVOY_CONFIG_MSAN=1
build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --copt -fsanitize-memory-track-origins=2
# MSAN needs -O1 to get reasonable performance.
build:clang-msan --copt -O1

# Clang with libc++
build:libc++ --config=clang
Expand Down Expand Up @@ -128,6 +131,10 @@ build:rbe-toolchain-clang-libc++ --action_env=CXXFLAGS=-stdlib=libc++
build:rbe-toolchain-clang-libc++ --action_env=LDFLAGS=-stdlib=libc++
build:rbe-toolchain-clang-libc++ --define force_libcpp=enabled

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-gcc --config=rbe-toolchain
build:rbe-toolchain-gcc --crosstool_top=@rbe_ubuntu_gcc//cc:toolchain
build:rbe-toolchain-gcc --extra_toolchains=@rbe_ubuntu_gcc//config:cc-toolchain
Expand All @@ -136,7 +143,7 @@ build:remote --spawn_strategy=remote,sandboxed,local
build:remote --strategy=Javac=remote,sandboxed,local
build:remote --strategy=Closure=remote,sandboxed,local
build:remote --strategy=Genrule=remote,sandboxed,local
build:remote --remote_timeout=3600
build:remote --remote_timeout=7200
build:remote --auth_enabled=true
build:remote --remote_download_toplevel

Expand All @@ -149,9 +156,13 @@ build:remote-clang-libc++ --config=rbe-toolchain-clang-libc++
build:remote-gcc --config=remote
build:remote-gcc --config=rbe-toolchain-gcc

build:remote-msan --config=remote
build:remote-msan --config=rbe-toolchain-clang-libc++
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#L7
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu@sha256:3ca8acc35fdb57ab26e1bb5f9488f37095f45acd77a12602510410dbefa00b58
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu@sha256:f0b2453c3587e3297f5caf5e97fbf57c97592c96136209ec13fe2795aae2c896
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
Expand All @@ -169,6 +180,10 @@ build:docker-clang-libc++ --config=rbe-toolchain-clang-libc++
build:docker-gcc --config=docker-sandbox
build:docker-gcc --config=rbe-toolchain-gcc

build:docker-msan --config=docker-sandbox
build:docker-msan --config=rbe-toolchain-clang-libc++
build:docker-msan --config=rbe-toolchain-msan

# CI configurations
build:remote-ci --remote_cache=grpcs://remotebuildexecution.googleapis.com
build:remote-ci --remote_executor=grpcs://remotebuildexecution.googleapis.com
Expand All @@ -182,4 +197,4 @@ build:asan-fuzzer --copt=-fsanitize=fuzzer-no-link
build:asan-fuzzer --test_env=UBSAN_OPTIONS=print_stacktrace=1

try-import %workspace%/clang.bazelrc
try-import %workspace%/user.bazelrc
try-import %workspace%/user.bazelrc
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 = "18911483b5c88e53c6ca2592a8eced3d747c968b" # December 2dn, 2019
ENVOY_SHA = "9f1871031c61549bf7072510a68f922a8c9011b1989c9dc20d98233b0cb0b33c"
ENVOY_COMMIT = "a78311faf214bb9216f92407102b547b6fcd14a3" # December 13th, 2019
ENVOY_SHA = "2e65ed67b3413e5c177321360ae6e15bf78dac24f65336a252bd59c1f6bb5a08"

RULES_PYTHON_COMMIT = "fdbb17a4118a1728d19e638a5291b4c4266ea5b8"
RULES_PYTHON_SHA = "9a3d71e348da504a9c4c5e8abd4cb822f7afb32c613dc6ee8b8535333a81a938"
Expand Down
13 changes: 6 additions & 7 deletions source/client/factories_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,14 @@ RequestSourcePtr RequestSourceFactoryImpl::create() const {
UriImpl uri(options_.uri());
Envoy::Http::HeaderMapPtr header = std::make_unique<Envoy::Http::HeaderMapImpl>();

header->insertMethod().value(envoy::api::v2::core::RequestMethod_Name(options_.requestMethod()));
header->insertPath().value(uri.path());
header->insertHost().value(uri.hostAndPort());
header->insertScheme().value(uri.scheme() == "https"
? Envoy::Http::Headers::get().SchemeValues.Https
: Envoy::Http::Headers::get().SchemeValues.Http);
header->setMethod(envoy::api::v2::core::RequestMethod_Name(options_.requestMethod()));
header->setPath(uri.path());
header->setHost(uri.hostAndPort());
header->setScheme(uri.scheme() == "https" ? Envoy::Http::Headers::get().SchemeValues.Https
: Envoy::Http::Headers::get().SchemeValues.Http);
const uint32_t content_length = options_.requestBodySize();
if (content_length > 0) {
header->insertContentLength().value(content_length);
header->setContentLength(content_length);
}

auto request_options = options_.toCommandLineOptions()->request_options();
Expand Down
2 changes: 1 addition & 1 deletion source/client/process_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ bool ProcessImpl::run(OutputCollector& collector) {
std::make_unique<Extensions::TransportSockets::Tls::ContextManagerImpl>(time_system_);
cluster_manager_factory_ = std::make_unique<ClusterManagerFactory>(
admin_, Envoy::Runtime::LoaderSingleton::get(), store_root_, tls_, generator_,
dispatcher_->createDnsResolver({}), *ssl_context_manager_, *dispatcher_, *local_info_,
dispatcher_->createDnsResolver({}, true), *ssl_context_manager_, *dispatcher_, *local_info_,
secret_manager_, validation_context_, *api_, http_context_, access_log_manager_,
*singleton_manager_);
cluster_manager_factory_->setPrefetchConnections(options_.prefetchConnections());
Expand Down
3 changes: 1 addition & 2 deletions source/client/stream_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ void StreamDecoder::finalizeActiveSpan() {
void StreamDecoder::setupForTracing(std::string& x_request_id) {
auto headers_copy = std::make_unique<Envoy::Http::HeaderMapImpl>(*request_headers_);
Envoy::Tracing::Decision tracing_decision = {Envoy::Tracing::Reason::ClientForced, true};
headers_copy->insertClientTraceId();
RELEASE_ASSERT(Envoy::UuidUtils::setTraceableUuid(x_request_id, Envoy::UuidTraceStatus::Client),
"setTraceableUuid failed");
headers_copy->ClientTraceId()->value(x_request_id);
headers_copy->setClientTraceId(x_request_id);
active_span_ = http_tracer_->startSpan(config_, *headers_copy, stream_info_, tracing_decision);
active_span_->injectContext(*headers_copy);
request_headers_.reset(headers_copy.release());
Expand Down
2 changes: 1 addition & 1 deletion source/common/uri_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ UriImpl::UriImpl(absl::string_view uri) : scheme_("http") {

bool UriImpl::performDnsLookup(Envoy::Event::Dispatcher& dispatcher,
const Envoy::Network::DnsLookupFamily dns_lookup_family) {
auto dns_resolver = dispatcher.createDnsResolver({});
auto dns_resolver = dispatcher.createDnsResolver({}, true);
std::string hostname = std::string(hostWithoutPort());

if (!hostname.empty() && hostname[0] == '[' && hostname[hostname.size() - 1] == ']') {
Expand Down
18 changes: 8 additions & 10 deletions test/benchmark_http_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,21 @@ TEST_F(BenchmarkClientHttpTest, StatusTrackingInOnComplete) {
request_generator_, true);
Envoy::Http::HeaderMapImpl header;

auto& status = header.insertStatus();

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

Expand Down
10 changes: 5 additions & 5 deletions test/server/http_test_server_filter_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class HttpTestServerIntegrationTestBase : public Envoy::HttpIntegrationTest,
encoder.getStream().addCallbacks(*response);

Envoy::Http::HeaderMapImpl headers;
headers.insertMethod().value(method);
headers.insertPath().value(url);
headers.insertHost().value(host);
headers.insertScheme().value(Envoy::Http::Headers::get().SchemeValues.Http);
headers.setMethod(method);
headers.setPath(url);
headers.setHost(host);
headers.setScheme(Envoy::Http::Headers::get().SchemeValues.Http);
if (!content_type.empty()) {
headers.insertContentType().value(content_type);
headers.setContentType(content_type);
}
request_header_delegate(headers);
encoder.encodeHeaders(headers, body.empty());
Expand Down