Skip to content

Commit

Permalink
hcm: removing envoy.reloadable_features.early_errors_via_hcm envoypro…
Browse files Browse the repository at this point in the history
…xy#14641

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
  • Loading branch information
alyssawilk committed Jan 13, 2021
1 parent c151936 commit 03696fe
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Removed Config or Runtime
*Normally occurs at the end of the* :ref:`deprecation period <deprecated>`

* access_logs: removed legacy unbounded access logs and runtime guard `envoy.reloadable_features.disallow_unbounded_access_logs`.
* http: removed legacy HTTP/1.1 error reporting path and runtime guard `envoy.reloadable_features.early_errors_via_hcm`.

New Features
------------
Expand Down
4 changes: 0 additions & 4 deletions source/common/http/http1/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,6 @@ void ServerConnectionImpl::sendProtocolErrorOld(absl::string_view details) {
}

Status ServerConnectionImpl::sendProtocolError(absl::string_view details) {
if (!Runtime::runtimeFeatureEnabled("envoy.reloadable_features.early_errors_via_hcm")) {
sendProtocolErrorOld(details);
return okStatus();
}
// We do this here because we may get a protocol error before we have a logical stream.
if (!active_request_.has_value()) {
RETURN_IF_ERROR(onMessageBeginBase());
Expand Down
1 change: 0 additions & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ constexpr const char* runtime_features[] = {
"envoy.reloadable_features.consume_all_retry_headers",
"envoy.reloadable_features.check_ocsp_policy",
"envoy.reloadable_features.disable_tls_inspector_injection",
"envoy.reloadable_features.early_errors_via_hcm",
"envoy.reloadable_features.enable_dns_cache_circuit_breakers",
"envoy.reloadable_features.fix_upgrade_response",
"envoy.reloadable_features.fix_wildcard_matching",
Expand Down
18 changes: 0 additions & 18 deletions test/common/http/http1/codec_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -930,24 +930,6 @@ TEST_F(Http1ServerConnectionImplTest, SimpleGet) {
EXPECT_EQ(0U, buffer.length());
}

TEST_F(Http1ServerConnectionImplTest, BadRequestNoStreamLegacy) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.early_errors_via_hcm", "false"}});
initialize();

std::string output;
ON_CALL(connection_, write(_, _)).WillByDefault(AddBufferToString(&output));

MockRequestDecoder decoder;
EXPECT_CALL(callbacks_, newStream(_, _)).Times(0);
EXPECT_CALL(decoder, sendLocalReply(_, _, _, _, _, _)).Times(0);

Buffer::OwnedImpl buffer("bad");
auto status = codec_->dispatch(buffer);
EXPECT_TRUE(isCodecProtocolError(status));
}

// Test that if the stream is not created at the time an error is detected, it
// is created as part of sending the protocol error.
TEST_F(Http1ServerConnectionImplTest, BadRequestNoStream) {
Expand Down

0 comments on commit 03696fe

Please sign in to comment.