Repository navigation
[Core] Log actor class import failures with their traceback - #66564
Merged
Merged
Conversation
Signed-off-by: xuwwwww <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the actor class loading logic in function_manager.py to use logger.exception instead of logger.debug when an error occurs, ensuring that the full traceback is captured. Additionally, a new test case has been added to verify that actor import errors are correctly logged. I have no further feedback to provide.
Signed-off-by: xuwwwww <[email protected]>
rueian
approved these changes
Sep 30, 2026
rueian
enabled auto-merge (squash)
September 30, 2026 23:18
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 4ccb698. Configure here.
Signed-off-by: xuwwwww <[email protected]>
auto-merge was automatically disabled
October 1, 2026 00:20
Head branch was pushed to by a user without write access
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ect#66564) ## Description When an actor class fails to import on a worker, Ray logs the failure at DEBUG level and creates a temporary actor to report it later. In the case reported in ray-project#49285, the user saw an async actor startup error without the original `ModuleNotFoundError` in the worker log. Log the import failure with its traceback at ERROR level. The temporary actor behavior stays the same. A focused test simulates a missing module and checks both the log and the existing fallback error. The test is registered in Bazel and includes a pytest entrypoint. ## Related issues Fixes ray-project#49285. ## Additional information I checked the issue and open PRs on 2026-09-29. The issue is open and unassigned, and I found no open PR for this log path. Tests run on Windows: - `..\ray-venv\Scripts\python.exe ..\..\outputs\run-ray-first-pr-test.py` — 1 passed after the CI logging fix. This local helper loads the modified `function_manager.py` over the Ray 2.58.0 binary wheel and sets the `ray` logger's propagation to `False` to reproduce the CI condition; it is not part of the PR. - The test file's `__main__` entrypoint — 1 passed. - Applicable pre-commit hooks passed. The Bash-based docstyle and Buildifier hooks could not run through Windows pre-commit. I ran docstyle with Git Bash and checked `BUILD.bazel` with Buildifier 8.0.1 on an LF-normalized copy; both passed. - `git diff --check` — passed. AI assistance was used to investigate this issue and prepare the patch and test. The submitter ran the focused test locally. --------- Signed-off-by: xuwwwww <[email protected]> Co-authored-by: Rueian <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Oct 21, 2026
… `test_token_auth_integration` on Windows (#66623) (#67213) Cherry-pick of #66623 (master commit 43cb165) onto `releases/2.60.0`. ## Why Both tests fail in the `:ray: core: :windows: python tests` job in all 11 `releases/2.60.0` postmerge builds so far, including build 20362 for the current branch head: - `test_runtime_env_image_uri.py::test_mounts_default_token_file` fails its token-mount assertion. The `auth_env` fixture redirects only `HOME`, but on Windows `Path.home()` reads `USERPROFILE`. - `test_token_auth_integration` times out at the 300s `medium` limit. Both failures started with #66467, which this branch has. #66623 sets `USERPROFILE` in the fixture and moves `test_token_auth_integration.py` to the `large` list (900s). It changes only tests and `BUILD.bazel`. On master, both tests failed in every release-automation postmerge build that ran them, from the branch point through build 20097. They have passed in all 49 builds that ran them since build 20102, the first to include #66623. ## Cherry-pick details Applied cleanly with `git cherry-pick -x`. The change is identical to the master commit: - Same 2 files, 5 insertions and 1 deletion, and the same `git patch-id --stable`. - The diff text matches except for the second `BUILD.bazel` hunk header. It starts 1 line earlier here, because this branch doesn't have the `test_function_manager_import_error.py` entry that #66564 added above it on master. No prerequisite commits are missing: - On master, only #66564 touched these files between the branch cut and #66623. It added that one test entry to another list. - After the pick, `test_runtime_env_image_uri.py` is identical to master at 43cb165, and `BUILD.bazel` differs only by that entry. - `test_token_auth_integration.py` is now in the same `large` list as on master (tag `large_size_python_tests_shard_0`). The separate `_client_mode` entry was already `large` and is unchanged. - On this branch, no commit after the cut touched these files. Not a duplicate: this branch doesn't contain #66623, and no PR against `releases/2.60.0` references it. ## Testing | Command | Result | |---|---| | `pre-commit run --files python/ray/tests/BUILD.bazel python/ray/tests/unit/test_runtime_env_image_uri.py` | Passed (ruff, black, buildifier, buildifier-lint, and the other applicable hooks) | Both fixes only change behavior on Windows, so I didn't run the tests locally on Linux. In CI they run in the `:ray: core: :windows: python tests` job. On premerge and microcheck, that job waits on the "run windows tests" block step. AI assistance was used to prepare this cherry-pick. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Chi-Sheng Liu <[email protected]> Signed-off-by: Sai Miduthuri <[email protected]> Co-authored-by: Chi-Sheng Liu <[email protected]> Co-authored-by: Mengjin Yan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
When an actor class fails to import on a worker, Ray logs the failure at DEBUG level and creates a temporary actor to report it later. In the case reported in #49285, the user saw an async actor startup error without the original
ModuleNotFoundErrorin the worker log.Log the import failure with its traceback at ERROR level. The temporary actor behavior stays the same. A focused test simulates a missing module and checks both the log and the existing fallback error. The test is registered in Bazel and includes a pytest entrypoint.
Related issues
Fixes #49285.
Additional information
I checked the issue and open PRs on 2026-09-29. The issue is open and unassigned, and I found no open PR for this log path.
Tests run on Windows:
..\ray-venv\Scripts\python.exe ..\..\outputs\run-ray-first-pr-test.py— 1 passed after the CI logging fix. This local helper loads the modifiedfunction_manager.pyover the Ray 2.58.0 binary wheel and sets theraylogger's propagation toFalseto reproduce the CI condition; it is not part of the PR.__main__entrypoint — 1 passed.BUILD.bazelwith Buildifier 8.0.1 on an LF-normalized copy; both passed.git diff --check— passed.AI assistance was used to investigate this issue and prepare the patch and test. The submitter ran the focused test locally.