[Core] Fix get_last_job() not actually sorting in test_task_events_2#62616
Open
Yicheng-Lu-llll wants to merge 3 commits intomasterfrom
Open
[Core] Fix get_last_job() not actually sorting in test_task_events_2#62616Yicheng-Lu-llll wants to merge 3 commits intomasterfrom
Yicheng-Lu-llll wants to merge 3 commits intomasterfrom
Conversation
Signed-off-by: Yicheng-Lu-llll <51814063+Yicheng-Lu-llll@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the get_last_job helper function in the Ray task events tests to use max() for retrieving the latest job ID. A review comment correctly identifies that the implementation uses inconsistent access patterns (dictionary vs. attribute) which would likely cause an AttributeError, and suggests handling empty job lists to avoid a ValueError.
edoakes
approved these changes
Apr 14, 2026
Collaborator
|
oops! |
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
sorted() returns a new sorted list instead of sorting in place. As a result, get_last_job() was returning an arbitrary job instead of the latest one.