Skip to content

[Core] Skip reporter and event aggregator client creation in minimal …#59846

Merged
edoakes merged 3 commits intoray-project:masterfrom
sampan-s-nayak:disable_telemetry_in_minimal
Jan 6, 2026
Merged

[Core] Skip reporter and event aggregator client creation in minimal …#59846
edoakes merged 3 commits intoray-project:masterfrom
sampan-s-nayak:disable_telemetry_in_minimal

Conversation

@sampan-s-nayak
Copy link
Contributor

@sampan-s-nayak sampan-s-nayak commented Jan 5, 2026

Description

dashboard agent services such as reporter agent and event aggregator agent do not run in minimal ray installs (pip install ray). this pr skips client creation (and adds a info log to guide users) when using minimal installs.

Related issues

Fixes #59665

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

sampan added 2 commits January 5, 2026 09:08
…installs

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Copy link
Contributor

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

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 correctly handles minimal installations by skipping the creation of metrics-related clients when the metrics agent is not available. The changes are consistent across core_worker_process.cc, gcs_server.cc, and raylet/main.cc, checking for a valid metrics agent port before initializing clients. This prevents unnecessary connection attempts and error logs in minimal install environments. The addition of a test case to document the behavior of exhausted retries is also a good practice. Overall, the changes are solid, and I have one suggestion to improve code conciseness.

@sampan-s-nayak sampan-s-nayak added the go add ONLY when ready to merge, run all tests label Jan 5, 2026
Signed-off-by: sampan <sampan@anyscale.com>
@sampan-s-nayak sampan-s-nayak marked this pull request as ready for review January 6, 2026 06:13
@sampan-s-nayak sampan-s-nayak requested a review from a team as a code owner January 6, 2026 06:13
(options.metrics_agent_port > 0)
? std::make_unique<rpc::EventAggregatorClientImpl>(options.metrics_agent_port,
*client_call_manager_)
: std::make_unique<rpc::EventAggregatorClientImpl>(*client_call_manager_);
Copy link

Choose a reason for hiding this comment

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

Null pointer dereference in EventAggregatorClient when aggregator enabled

When metrics_agent_port <= 0 (minimal install), the code creates an EventAggregatorClientImpl with deferred connection, which leaves grpc_client_ uninitialized (null). However, if a user enables the event aggregator feature via RAY_enable_core_worker_ray_event_to_aggregator=1, the SendRayEventsToAggregator function will call event_aggregator_client_->AddEvents(), which internally dereferences grpc_client_. This causes a null pointer dereference crash. The original code always initialized grpc_client_ via Connect(port), even with an invalid port. A guard is needed to either disable the aggregator feature or handle the null client when metrics_agent_port <= 0.

Fix in Cursor Fix in Web

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core observability Issues related to the Ray Dashboard, Logging, Metrics, Tracing, and/or Profiling labels Jan 6, 2026
@edoakes edoakes merged commit a929ef1 into ray-project:master Jan 6, 2026
6 checks passed
AYou0207 pushed a commit to AYou0207/ray that referenced this pull request Jan 13, 2026
ray-project#59846)

## Description
dashboard agent services such as reporter agent and event aggregator
agent do not run in minimal ray installs (`pip install ray`). this pr
skips client creation (and adds a info log to guide users) when using
minimal installs.

## Related issues
Fixes ray-project#59665

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: jasonwrwang <jasonwrwang@tencent.com>
lee1258561 pushed a commit to pinterest/ray that referenced this pull request Feb 3, 2026
ray-project#59846)

## Description
dashboard agent services such as reporter agent and event aggregator
agent do not run in minimal ray installs (`pip install ray`). this pr
skips client creation (and adds a info log to guide users) when using
minimal installs.

## Related issues
Fixes ray-project#59665

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Feb 3, 2026
ray-project#59846)

## Description
dashboard agent services such as reporter agent and event aggregator
agent do not run in minimal ray installs (`pip install ray`). this pr
skips client creation (and adds a info log to guide users) when using
minimal installs.

## Related issues
Fixes ray-project#59665

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
ray-project#59846)

## Description
dashboard agent services such as reporter agent and event aggregator
agent do not run in minimal ray installs (`pip install ray`). this pr
skips client creation (and adds a info log to guide users) when using
minimal installs.

## Related issues
Fixes ray-project#59665

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
ray-project#59846)

## Description
dashboard agent services such as reporter agent and event aggregator
agent do not run in minimal ray installs (`pip install ray`). this pr
skips client creation (and adds a info log to guide users) when using
minimal installs.

## Related issues
Fixes ray-project#59665

## Additional information
> Optional: Add implementation details, API changes, usage examples,
screenshots, etc.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
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 observability Issues related to the Ray Dashboard, Logging, Metrics, Tracing, and/or Profiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[<Ray component: Core|RLlib|etc...>] RpcError: Running out of retries to initialize the metrics agent. rpc_code: 14

2 participants