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
19 changes: 18 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ 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

build:rbe-toolchain-msvc-cl --host_platform=@rbe_windows_msvc_cl//config:platform
build:rbe-toolchain-msvc-cl --platforms=@rbe_windows_msvc_cl//config:platform
build:rbe-toolchain-msvc-cl --crosstool_top=@rbe_windows_msvc_cl//cc:toolchain
build:rbe-toolchain-msvc-cl --extra_toolchains=@rbe_windows_msvc_cl//config:cc-toolchain

build:remote --spawn_strategy=remote,sandboxed,local
build:remote --strategy=Javac=remote,sandboxed,local
build:remote --strategy=Closure=remote,sandboxed,local
Expand All @@ -174,6 +179,15 @@ build:remote --remote_timeout=7200
build:remote --auth_enabled=true
build:remote --remote_download_toplevel

# Windows bazel does not allow sandboxed as a spawn strategy
build:remote-windows --spawn_strategy=remote,local
build:remote-windows --strategy=Javac=remote,local
build:remote-windows --strategy=Closure=remote,local
build:remote-windows --strategy=Genrule=remote,local
build:remote-windows --remote_timeout=7200
build:remote-windows --auth_enabled=true
build:remote-windows --remote_download_toplevel

build:remote-clang --config=remote
build:remote-clang --config=rbe-toolchain-clang

Expand All @@ -187,9 +201,12 @@ build:remote-msan --config=remote
build:remote-msan --config=rbe-toolchain-clang-libc++
build:remote-msan --config=rbe-toolchain-msan

build:remote-msvc-cl --config=remote-windows
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:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:f21773ab398a879f976936f72c78c9dd3718ca1e
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 # June 19th, 2020
envoyproxy/envoy-build-ubuntu:12b3d2c2ffa582507e5d6dd34632b2b990f1b195
envoy-build-image: &envoy-build-image # July 1st, 2020
envoyproxy/envoy-build-ubuntu:f21773ab398a879f976936f72c78c9dd3718ca1e
version: 2
jobs:
build:
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 = "7f251daa2e488587bc7335f91faceed420f162c4" # June 19th, 2020
ENVOY_SHA = "bc14914c9639eca9c5b2b09117b812796067c17c7f1d0d3f7ad622d554323d94"
ENVOY_COMMIT = "f6b86a58b264b46a57d71a9b3b0989b2969df408" # July 2nd, 2020
ENVOY_SHA = "5c802266f0cdc5193b6e0247a0f5f20f39f6cc36b688b194e60a853148ba438a"

HDR_HISTOGRAM_C_VERSION = "0.9.13" # Feb 22nd, 2020
HDR_HISTOGRAM_C_SHA = "2bd4a4631b64f2f8cf968ef49dd03ff3c51b487c3c98a01217ae4cf4a35b8310"
Expand Down
5 changes: 3 additions & 2 deletions source/client/benchmark_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Http1PoolImpl::newStream(Envoy::Http::ResponseDecoder& response_decoder,
while (host_->cluster().resourceManager(priority_).connections().canCreate()) {
// We cannot rely on ::tryCreateConnection here, because that might decline without
// updating connections().canCreate() above. We would risk an infinite loop.
ActiveClientPtr client = instantiateActiveClient();
Envoy::ConnectionPool::ActiveClientPtr client = instantiateActiveClient();
connecting_request_capacity_ += client->effectiveConcurrentRequestLimit();
client->moveIntoList(std::move(client), owningList(client->state_));
}
Expand All @@ -38,7 +38,8 @@ Http1PoolImpl::newStream(Envoy::Http::ResponseDecoder& response_decoder,
// of ready_clients_, which will pick the oldest one instead. This makes us cycle through
// all the available connections.
if (!ready_clients_.empty() && connection_reuse_strategy_ == ConnectionReuseStrategy::LRU) {
attachRequestToClient(*ready_clients_.back(), response_decoder, callbacks);
Envoy::Http::HttpAttachContext context({&response_decoder, &callbacks});
attachRequestToClient(*ready_clients_.back(), context);
return nullptr;
}

Expand Down
50 changes: 36 additions & 14 deletions source/client/process_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,11 @@ void ProcessImpl::createBootstrapConfiguration(envoy::config::bootstrap::v3::Boo
cluster->set_name(fmt::format("{}", i));
cluster->mutable_connect_timeout()->set_seconds(options_.timeout().count());
cluster->mutable_max_requests_per_connection()->set_value(options_.maxRequestsPerConnection());
if (options_.h2() && options_.h2UseMultipleConnections()) {
cluster->mutable_http2_protocol_options()->mutable_max_concurrent_streams()->set_value(1);
if (options_.h2()) {
auto* cluster_http2_protocol_options = cluster->mutable_http2_protocol_options();
if (options_.h2UseMultipleConnections()) {
cluster_http2_protocol_options->mutable_max_concurrent_streams()->set_value(1);
}
}

auto thresholds = cluster->mutable_circuit_breakers()->add_thresholds();
Expand All @@ -306,11 +309,17 @@ void ProcessImpl::createBootstrapConfiguration(envoy::config::bootstrap::v3::Boo

cluster->set_type(
envoy::config::cluster::v3::Cluster::DiscoveryType::Cluster_DiscoveryType_STATIC);

auto* load_assignment = cluster->mutable_load_assignment();
load_assignment->set_cluster_name(cluster->name());
auto* endpoints = cluster->mutable_load_assignment()->add_endpoints();
for (const UriPtr& uri : uris) {
auto* host = cluster->add_hidden_envoy_deprecated_hosts();
auto* socket_address = host->mutable_socket_address();
socket_address->set_address(uri->address()->ip()->addressAsString());
socket_address->set_port_value(uri->port());
auto* socket = endpoints->add_lb_endpoints()
->mutable_endpoint()
->mutable_address()
->mutable_socket_address();
socket->set_address(uri->address()->ip()->addressAsString());
socket->set_port_value(uri->port());
}
if (request_source_uri != nullptr) {
addRequestSourceCluster(*request_source_uri, i, bootstrap);
Expand All @@ -325,10 +334,16 @@ void ProcessImpl::addTracingCluster(envoy::config::bootstrap::v3::Bootstrap& boo
cluster->mutable_connect_timeout()->set_seconds(options_.timeout().count());
cluster->set_type(
envoy::config::cluster::v3::Cluster::DiscoveryType::Cluster_DiscoveryType_STATIC);
auto* host = cluster->add_hidden_envoy_deprecated_hosts();
auto* socket_address = host->mutable_socket_address();
socket_address->set_address(uri.address()->ip()->addressAsString());
socket_address->set_port_value(uri.port());
auto* load_assignment = cluster->mutable_load_assignment();
load_assignment->set_cluster_name(cluster->name());
auto* socket = cluster->mutable_load_assignment()
->add_endpoints()
->add_lb_endpoints()
->mutable_endpoint()
->mutable_address()
->mutable_socket_address();
socket->set_address(uri.address()->ip()->addressAsString());
socket->set_port_value(uri.port());
}

void ProcessImpl::setupTracingImplementation(envoy::config::bootstrap::v3::Bootstrap& bootstrap,
Expand Down Expand Up @@ -386,10 +401,17 @@ void ProcessImpl::addRequestSourceCluster(
cluster->set_type(
envoy::config::cluster::v3::Cluster::DiscoveryType::Cluster_DiscoveryType_STATIC);
cluster->mutable_connect_timeout()->set_seconds(options_.timeout().count());
auto* host = cluster->add_hidden_envoy_deprecated_hosts();
auto* socket_address = host->mutable_socket_address();
socket_address->set_address(uri.address()->ip()->addressAsString());
socket_address->set_port_value(uri.port());

auto* load_assignment = cluster->mutable_load_assignment();
load_assignment->set_cluster_name(cluster->name());
auto* socket = cluster->mutable_load_assignment()
->add_endpoints()
->add_lb_endpoints()
->mutable_endpoint()
->mutable_address()
->mutable_socket_address();
socket->set_address(uri.address()->ip()->addressAsString());
socket->set_port_value(uri.port());
}

bool ProcessImpl::runInternal(OutputCollector& collector, const std::vector<UriPtr>& uris,
Expand Down