Skip to content

[Data] Give test_random_access a moderate timeout - #67097

Merged
goutamvenkat-anyscale merged 1 commit into
ray-project:masterfrom
goutamvenkat-anyscale:goutam/test-random-access-timeout
Oct 16, 2026
Merged

goutamvenkat-anyscale merged 1 commit into
ray-project:masterfrom
goutamvenkat-anyscale:goutam/test-random-access-timeout

Conversation

@goutamvenkat-anyscale

@goutamvenkat-anyscale goutamvenkat-anyscale commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • //python/ray/data:test_random_access flakes because Bazel size = "small" kills the target at 60s. Recent passing runs took 36s, 53s, and 59s. Failures are SIGTERM during test_stats (the last test), not assertion errors. See postmerge build 20322.
  • The duration regression comes from [Data] Add task-based shuffle v2 support for sort #64875, which plans Dataset.sort() as SortSamplingOp -> SortShuffleMapOp -> ShuffleReduceOp under the default SHUFFLE_V2 strategy. to_random_access_dataset() sorts on every call, and this file does that five times (10 or 20 partitions, one 1-CPU sample task per block, then an ordered reduce per partition). That fixed per-stage cost is what pushed the target up against the 60s cap. The serial get_async loop predates the regression.
  • Keep size = "small" and set timeout = "moderate" (5 minutes). This API is deprecated; the test should not grow a special sort path.
  • This does not duplicate an open issue or PR. gh pr list --repo ray-project/ray --state open --search "test_random_access in:title" returned nothing.

Test plan

  • Data CI on this PR, including the arrow v23 shard, runs //python/ray/data:test_random_access and it finishes instead of TIMEOUT around 60s.
  • No local test run. The only change is the Bazel timeout attribute, which local pytest does not apply. The flake is the 60s CI kill.

AI assistance was used.

Passing runs take 36-59s, so the small-test default of 60s times out under load.

Signed-off-by: Goutam <[email protected]>
Co-authored-by: Cursor <[email protected]>
@goutamvenkat-anyscale
goutamvenkat-anyscale requested a review from a team as a code owner October 16, 2026 00:06

@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 updates the Bazel build configuration for the test_random_access target in python/ray/data/BUILD.bazel. It adds an explanatory comment and increases the test timeout to 'moderate' to prevent timeouts under heavy load. There are no review comments to evaluate, and the changes appear correct.

@goutamvenkat-anyscale goutamvenkat-anyscale added data Ray Data-related issues go add ONLY when ready to merge, run all tests labels Oct 16, 2026

@rayhhome rayhhome 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.

LGTM with a nit

],
)

# Several distributed sorts plus hundreds of serial ray.get calls. Passing

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.

Do we need to add this comment

@goutamvenkat-anyscale
goutamvenkat-anyscale merged commit 45b8683 into ray-project:master Oct 16, 2026
6 checks passed
@goutamvenkat-anyscale
goutamvenkat-anyscale deleted the goutam/test-random-access-timeout branch October 16, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues 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