Skip to content

Conversation

@bveeramani
Copy link
Member

@bveeramani bveeramani commented Nov 25, 2025

Summary

This PR removes test_large_args_scheduling_strategy from test_stats.py because its flaky and not worth keeping (It tests implementation details rather than behavior and conflates multiple concerns)

See https://buildkite.com/ray-project/premerge/builds/54495#019ab720-249f-49c5-8e25-5e9005cc41e2

Motivation

  1. Hardcodes scheduling strategy values - The test assumes large args use 'DEFAULT' and small args use 'SPREAD'. If these defaults change in context.py, the test fails even though the system is working correctly.

  2. Tests stats format, not scheduling behavior - The test doesn't verify that the correct scheduling strategy is actually passed to Ray tasks. It only checks that a specific string appears in stats output.

  3. Mixes two concerns - The test conflates:

    • Scheduling strategy selection based on data size (belongs in a map-related test)
    • Stats output including scheduling strategy info (belongs in a general stats formatting test)

Remove test that tests implementation details rather than behavior
and conflates multiple concerns.

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani requested a review from a team as a code owner November 25, 2025 07:55
@bveeramani bveeramani changed the title [Data] Remove test_large_args_scheduling_strategy [Data] Remove test_large_args_scheduling_strategy Nov 25, 2025
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 removes the test_large_args_scheduling_strategy test from test_stats.py, along with its associated constants. The rationale for this removal is well-justified: the test was brittle due to hardcoded implementation details, it tested the format of statistics rather than the actual scheduling behavior, and it conflated multiple concerns. The changes are clean and correctly remove the specified test and its unused helper variables. This is a good cleanup that improves the quality and maintainability of the test suite. I have no further comments.

@bveeramani bveeramani enabled auto-merge (squash) November 25, 2025 08:24
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Nov 25, 2025
@bveeramani bveeramani merged commit 562c233 into master Nov 25, 2025
6 of 7 checks passed
@bveeramani bveeramani deleted the remove-test-large-args-scheduling-strategy branch November 25, 2025 09:01
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
## Summary
This PR removes `test_large_args_scheduling_strategy` from
`test_stats.py` because its flaky and not worth keeping (It tests
implementation details rather than behavior and conflates multiple
concerns)

See
https://buildkite.com/ray-project/premerge/builds/54495#019ab720-249f-49c5-8e25-5e9005cc41e2

## Motivation

1. **Hardcodes scheduling strategy values** - The test assumes large
args use `'DEFAULT'` and small args use `'SPREAD'`. If these defaults
change in `context.py`, the test fails even though the system is working
correctly.

2. **Tests stats format, not scheduling behavior** - The test doesn't
verify that the correct scheduling strategy is actually passed to Ray
tasks. It only checks that a specific string appears in stats output.

3. **Mixes two concerns** - The test conflates:
- Scheduling strategy selection based on data size (belongs in a
map-related test)
- Stats output including scheduling strategy info (belongs in a general
stats formatting test)

Signed-off-by: Balaji Veeramani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants