Skip to content

[core] Keep absl logging at ERROR unless GRPC_VERBOSITY is set - #67719

Merged
elliot-barn merged 1 commit into
masterfrom
elliot-barn/absl-log-level-error
Nov 10, 2026
Merged

elliot-barn merged 1 commit into
masterfrom
elliot-barn/absl-log-level-error

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Description

gRPC >= 1.65 logs through absl. When GRPC_VERBOSITY is unset, gRPC leaves absl's minimum log level alone, and absl defaults to INFO. gRPC INFO messages (e.g. "Got goaway") then reach stderr and get forwarded to the driver. Older gRPC defaulted to ERROR.

RayLog::StartRayLog now sets absl's minimum log level to ERROR once per process, unless GRPC_VERBOSITY is set. Ray's own logging goes through spdlog and is unaffected.

Note for reviewers: protobuf (23.4 today) also logs through absl, so landing this before the gRPC bump also hides protobuf's absl INFO and WARNING output. Master ends up in that state after the bump anyway.

Related issues

Split out of #66483 (protobuf 29 / gRPC 1.69) to make that PR easier to review.

🤖 Generated with Claude Code

gRPC >= 1.65 logs through absl, and when GRPC_VERBOSITY is unset it leaves
absl's minimum log level at absl's INFO default. With gRPC 1.69 that sends
gRPC INFO messages (e.g. chttp2 'Got goaway') to the raylet's stderr, which
Ray forwards to the driver; tune's test_progress_reporter fails on them
whenever a GOAWAY happens during the test. Older gRPC defaulted to ERROR.
Set absl's minimum level to ERROR in StartRayLog (raylet, GCS, core worker)
unless the user sets GRPC_VERBOSITY. Ray's own logs go through spdlog and are
unaffected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures absl's minimum log level to default to kError when GRPC_VERBOSITY is unset or empty, preventing verbose gRPC INFO logs from flooding stderr. A corresponding unit test was added to verify this behavior. The reviewer noted that the new test is environment-dependent and could fail if GRPC_VERBOSITY is set in the test runner's environment, suggesting to skip the test in such cases.

Comment on lines +195 to +200
TEST(PrintLogTest, TestAbslMinLogLevelDefaultsToError) {
ASSERT_EQ(std::getenv("GRPC_VERBOSITY"), nullptr);
RayLog::StartRayLog("/tmp/gcs", RayLogLevel::INFO, /*log_filepath=*/"");
EXPECT_EQ(absl::MinLogLevel(), absl::LogSeverityAtLeast::kError);
RayLog::ShutDownRayLog();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The test TestAbslMinLogLevelDefaultsToError is environment-dependent and will fail if the GRPC_VERBOSITY environment variable is set (even to an empty string) in the test runner's environment. To make the test robust and prevent flaky failures in local development or CI environments, we should skip the assertion or the test when GRPC_VERBOSITY is present.

TEST(PrintLogTest, TestAbslMinLogLevelDefaultsToError) {
  if (std::getenv("GRPC_VERBOSITY") != nullptr) {
    SUCCEED() << "Skipping test because GRPC_VERBOSITY is set in the environment.";
    return;
  }
  RayLog::StartRayLog("/tmp/gcs", RayLogLevel::INFO, /*log_filepath=*/"");
  EXPECT_EQ(absl::MinLogLevel(), absl::LogSeverityAtLeast::kError);
  RayLog::ShutDownRayLog();
}

@ray-gardener ray-gardener Bot added the core Issues that should be addressed in Ray Core label Nov 5, 2026
@karticam karticam self-assigned this Nov 10, 2026
@karticam

Copy link
Copy Markdown
Contributor

LGTM!

@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Nov 10, 2026
@elliot-barn
elliot-barn enabled auto-merge (squash) November 10, 2026 08:55
@elliot-barn
elliot-barn merged commit 3e20c5f into master Nov 10, 2026
8 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/absl-log-level-error branch November 10, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants