Skip to content

Conversation

@aslonnie
Copy link
Collaborator

@aslonnie aslonnie commented Oct 31, 2025

so that we can perform surgeries in the last minute if required.

@aslonnie aslonnie requested a review from a team as a code owner October 31, 2025 17:44
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 adds support for downloading wheels from an arbitrary S3 branch path, which is a good enhancement. The changes in ray_wheels_lib.py and the new test case are mostly well-implemented. However, I've identified a critical bug in upload_wheels_pypi.py related to the ordering of command-line arguments that could lead to incorrect behavior. I have also provided a suggestion to improve test maintainability by reducing code duplication. Please address the critical issue before merging.

Comment on lines +159 to +183
def test_download_ray_wheels_from_s3_with_branch(
mock_get_wheel_names, mock_check_wheels, mock_download_wheel
):
commit_hash = "1234567"
ray_version = "1.0.0"

mock_get_wheel_names.return_value = SAMPLE_WHEELS

with tempfile.TemporaryDirectory() as tmp_dir:
download_ray_wheels_from_s3(
commit_hash=commit_hash,
ray_version=ray_version,
directory_path=tmp_dir,
branch="custom_branch",
)

mock_get_wheel_names.assert_called_with(ray_version=ray_version)
assert mock_download_wheel.call_count == len(SAMPLE_WHEELS)
for i, call_args in enumerate(mock_download_wheel.call_args_list):
assert (
call_args[0][0] == f"custom_branch/{commit_hash}/{SAMPLE_WHEELS[i]}.whl"
)
assert call_args[0][1] == tmp_dir

mock_check_wheels.assert_called_with(tmp_dir, SAMPLE_WHEELS)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This test function is very similar to test_download_ray_wheels_from_s3. This duplication can make the tests harder to maintain. To improve maintainability, consider refactoring this test and test_download_ray_wheels_from_s3 into a single, parameterized test using pytest.mark.parametrize. This would allow you to test both cases (with and without a branch) with a single test function, reducing code duplication.

@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Oct 31, 2025
@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod release-test release test labels Oct 31, 2025
@aslonnie aslonnie merged commit 6d1e343 into master Oct 31, 2025
6 checks passed
@aslonnie aslonnie deleted the lonnie-251031-branchdl branch October 31, 2025 20:24
YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
…oject#58344)

so that we can perform surgeries in the last minute if required.

Signed-off-by: Lonnie Liu <[email protected]>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…oject#58344)

so that we can perform surgeries in the last minute if required.

Signed-off-by: Lonnie Liu <[email protected]>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…oject#58344)

so that we can perform surgeries in the last minute if required.

Signed-off-by: Lonnie Liu <[email protected]>
Signed-off-by: Aydin Abiar <[email protected]>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
…oject#58344)

so that we can perform surgeries in the last minute if required.

Signed-off-by: Lonnie Liu <[email protected]>
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 devprod go add ONLY when ready to merge, run all tests release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants