Skip to content

Commit d394feb

Browse files
authored
Update Envoy to 72bf41f (Jun 4 2021). (envoyproxy#696)
After envoy switched to the true abseil type of string_view (envoyproxy/envoy@72bf41f), we can no longer assign `absl::string_view` to `std::string`. Changing Nighthawk code accordingly. Signed-off-by: Jakub Sobon <[email protected]>
1 parent fffa66b commit d394feb

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

bazel/repositories.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22

3-
ENVOY_COMMIT = "0fae6970ddaf93f024908ba304bbd2b34e997a51" # Jun 4, 2021
4-
ENVOY_SHA = "9dd201f00c1ad4d37f17c969ba200c1a3dad6d28ea0ae2a76874d01a98f6b011"
3+
ENVOY_COMMIT = "72bf41fb0ecc039f196be02f534bfc2c9c69f348" # Jun 4, 2021
4+
ENVOY_SHA = "db07426cf02fa2f8ed9891e64adf67ced39e72cdcce9ba121d420b471cc96766"
55

66
HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020
77
HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad"

source/sink/service_impl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ absl::Status mergeOutput(const nighthawk::client::Output& input_to_merge,
9898
}
9999

100100
absl::StatusOr<nighthawk::client::ExecutionResponse>
101-
mergeExecutionResponses(absl::string_view requested_execution_id,
101+
mergeExecutionResponses(const std::string& requested_execution_id,
102102
const std::vector<nighthawk::client::ExecutionResponse>& responses) {
103103
if (responses.size() == 0) {
104104
return absl::Status(absl::StatusCode::kNotFound, "No results");
105105
}
106106

107107
nighthawk::client::ExecutionResponse aggregated_response;
108108
nighthawk::client::Output aggregated_output;
109-
aggregated_response.mutable_execution_id()->assign(requested_execution_id);
109+
aggregated_response.set_execution_id(requested_execution_id);
110110
for (const nighthawk::client::ExecutionResponse& execution_response : responses) {
111111
if (execution_response.execution_id() != requested_execution_id) {
112112
return absl::Status(absl::StatusCode::kInternal,

source/sink/service_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Nighthawk {
2727
* status in case sanity checks failed.
2828
*/
2929
absl::StatusOr<nighthawk::client::ExecutionResponse>
30-
mergeExecutionResponses(absl::string_view execution_id,
30+
mergeExecutionResponses(const std::string& execution_id,
3131
const std::vector<nighthawk::client::ExecutionResponse>& responses);
3232

3333
/**

test/adaptive_load/adaptive_load_client_main_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ TEST(AdaptiveLoadClientMainTest, WritesOutputProtoToFile) {
298298
EXPECT_CALL(*mock_file, write_(_))
299299
.WillRepeatedly(Invoke(
300300
[&actual_outfile_contents](absl::string_view data) -> Envoy::Api::IoCallSizeResult {
301-
actual_outfile_contents += data;
301+
actual_outfile_contents += std::string(data);
302302
return Envoy::Api::IoCallSizeResult(
303303
static_cast<ssize_t>(data.length()),
304304
Envoy::Api::IoErrorPtr(nullptr, [](Envoy::Api::IoError*) {}));

test/request_source/request_source_plugin_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ using nighthawk::request_source::StubPluginConfig;
2323
using ::testing::NiceMock;
2424
using ::testing::Test;
2525
nighthawk::request_source::FileBasedOptionsListRequestSourceConfig
26-
MakeFileBasedPluginConfigWithTestYaml(absl::string_view request_file) {
26+
MakeFileBasedPluginConfigWithTestYaml(const std::string& request_file) {
2727
nighthawk::request_source::FileBasedOptionsListRequestSourceConfig config;
28-
config.mutable_file_path()->assign(request_file);
28+
config.set_file_path(request_file);
2929
config.mutable_max_file_size()->set_value(4000);
3030
return config;
3131
}

0 commit comments

Comments
 (0)