Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ 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`.

New Features
------------

Deprecated
----------
----------
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.disallow_unbounded_access_logs",
"envoy.reloadable_features.early_errors_via_hcm",
"envoy.reloadable_features.enable_dns_cache_circuit_breakers",
"envoy.reloadable_features.fix_upgrade_response",
Expand Down
9 changes: 2 additions & 7 deletions source/extensions/access_loggers/common/grpc_access_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,8 @@ class GrpcAccessLogger : public Detail::GrpcAccessLogger<HttpLogProto, TcpLogPro
stats_.logs_written_.inc();
return true;
}
if (Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.disallow_unbounded_access_logs")) {
stats_.logs_dropped_.inc();
return false;
}
stats_.logs_written_.inc();
return true;
stats_.logs_dropped_.inc();
Comment thread
asraa marked this conversation as resolved.
return false;
}

const std::chrono::milliseconds buffer_flush_interval_msec_;
Expand Down
36 changes: 0 additions & 36 deletions test/extensions/access_loggers/common/grpc_access_logger_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,42 +230,6 @@ TEST_F(GrpcAccessLogTest, WatermarksOverrun) {
TestUtility::findCounter(stats_store_, "mock_access_log_prefix.logs_dropped")->value());
}

// Test legacy behavior of unbounded access logs.
TEST_F(GrpcAccessLogTest, WatermarksLegacy) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.disallow_unbounded_access_logs", "false"}});

initLogger(FlushInterval, 1);

// Start a stream for the first log.
MockAccessLogStream stream;
AccessLogCallbacks* callbacks;
expectStreamStart(stream, &callbacks);

EXPECT_CALL(stream, isAboveWriteBufferHighWatermark())
.Times(AnyNumber())
.WillRepeatedly(Return(true));

// Fail to flush, so the log stays buffered up.
EXPECT_CALL(stream, sendMessageRaw_(_, false)).Times(0);
logger_->log(mockHttpEntry());
// Message should still be initialized.
EXPECT_EQ(1, logger_->numInits());
EXPECT_EQ(1,
TestUtility::findCounter(stats_store_, "mock_access_log_prefix.logs_written")->value());
EXPECT_EQ(0,
TestUtility::findCounter(stats_store_, "mock_access_log_prefix.logs_dropped")->value());

// As with the above test, try to log more. The log will not be dropped.
EXPECT_CALL(stream, sendMessageRaw_(_, _)).Times(0);
logger_->log(mockHttpEntry());
EXPECT_EQ(2,
TestUtility::findCounter(stats_store_, "mock_access_log_prefix.logs_written")->value());
EXPECT_EQ(0,
TestUtility::findCounter(stats_store_, "mock_access_log_prefix.logs_dropped")->value());
}

// Test that stream failure is handled correctly.
TEST_F(GrpcAccessLogTest, StreamFailure) {
initLogger(FlushInterval, 0);
Expand Down