Repository navigation
[cherry-pick][2.60.0][Fix][Core] Fix test_runtime_env_image_uri and test_token_auth_integration on Windows (#66623) - #67213
Merged
elliot-barn merged 1 commit intoOct 21, 2026
Conversation
…ation on Windows (#66623) ## Description Two Windows tests have failed on every Windows postmerge build since #66467 (builds 20012, 20016, 20026 and 20040). This PR fixes both. - `//python/ray/tests/unit:test_runtime_env_image_uri`: `test_mounts_default_token_file` fails because the `auth_env` fixture redirects only `HOME`. On Windows, `Path.home()` reads `USERPROFILE` and ignores `HOME`, so the code looks for the real `~/.ray/auth_token` and never adds the mount. The fixture now sets `USERPROFILE` too. - `//python/ray/tests:test_token_auth_integration`: the file times out at the `medium` limit (300s). Before #66467 it already took 277-297s on Windows. #66467 added `test_ray_init_connect_reuses_existing_token` with 3 parameters, and each one runs `ray start --head`, which pushes the file past the limit. This PR moves the file to the `large` list (900s). `test_streaming_generator.py` is already there for the same reason. ## Related issues Related to #66467. ## Additional information Both targets are now in the `FLAKY` state in the CI test database, so the regular premerge jobs on this PR skip them. To check the fix, I ran each target 3 times on Windows premerge, once on master and once on master plus this fix, with retries off and the test database lookup bypassed. | Target | master | master + fix | | --- | --- | --- | | `test_runtime_env_image_uri` | 3/3 failed (same assertion as postmerge) | 0/3 failed | | `test_token_auth_integration` | 3/3 timed out at 300s | 0/3 failed, 324-345s per run | - master: #66637, https://buildkite.com/ray-project/premerge/builds/74235 - master + fix: #66638, https://buildkite.com/ray-project/premerge/builds/74236 Signed-off-by: Chi-Sheng Liu <[email protected]> Co-authored-by: Mengjin Yan <[email protected]> (cherry picked from commit 43cb165) Signed-off-by: Sai Miduthuri <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request moves the test_token_auth_integration.py test to a larger shard in BUILD.bazel to prevent timeouts on Windows, and updates the auth_env fixture in test_runtime_env_image_uri.py to set the USERPROFILE environment variable for proper Windows compatibility. There are no review comments, and I have no feedback to provide.
Yicheng-Lu-llll
approved these changes
Oct 20, 2026
sai-miduthuri
enabled auto-merge (squash)
October 21, 2026 21:01
elliot-barn
disabled auto-merge
October 21, 2026 21:04
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.
Cherry-pick of #66623 (master commit 43cb165) onto
releases/2.60.0.Why
Both tests fail in the
:ray: core: :windows: python testsjob in all 11releases/2.60.0postmerge builds so far, including build 20362 for the current branch head:test_runtime_env_image_uri.py::test_mounts_default_token_filefails its token-mount assertion. Theauth_envfixture redirects onlyHOME, but on WindowsPath.home()readsUSERPROFILE.test_token_auth_integrationtimes out at the 300smediumlimit.Both failures started with #66467, which this branch has. #66623 sets
USERPROFILEin the fixture and movestest_token_auth_integration.pyto thelargelist (900s). It changes only tests andBUILD.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:git patch-id --stable.BUILD.bazelhunk header. It starts 1 line earlier here, because this branch doesn't have thetest_function_manager_import_error.pyentry that [Core] Log actor class import failures with their traceback #66564 added above it on master.No prerequisite commits are missing:
test_runtime_env_image_uriandtest_token_auth_integrationon Windows #66623. It added that one test entry to another list.test_runtime_env_image_uri.pyis identical to master at 43cb165, andBUILD.bazeldiffers only by that entry.test_token_auth_integration.pyis now in the samelargelist as on master (taglarge_size_python_tests_shard_0). The separate_client_modeentry was alreadylargeand is unchanged.Not a duplicate: this branch doesn't contain #66623, and no PR against
releases/2.60.0references it.Testing
pre-commit run --files python/ray/tests/BUILD.bazel python/ray/tests/unit/test_runtime_env_image_uri.pyBoth 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 testsjob. 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