Skip to content

Conversation

@aslonnie
Copy link
Collaborator

@aslonnie aslonnie commented Jan 30, 2026

rather than exit early. this makes sure that the job url and job ids are all assigned even for release test jobs that failed.

@aslonnie aslonnie requested a review from a team as a code owner January 30, 2026 14:26
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 refactors run_release_test_anyscale to retrieve job information (URL, ID, logs) even when an exception occurs during the test run. This is a valuable change for improving the debuggability of failed tests. The accompanying test updates correctly validate this new behavior. My main feedback is to add error handling around the new block that retrieves job information, as it could fail and cause an unhandled exception, which would be counterproductive to the goal of this PR.

Comment on lines +548 to +550
result.job_url = runner.job_url()
result.job_id = runner.job_id()
if result.job_id:
result.last_logs = runner.get_last_logs()
Copy link
Contributor

Choose a reason for hiding this comment

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

high

While moving this logic out of the main try block is a good idea to ensure job details are captured on failure, this new block is not protected by a try...except. If any of the runner methods (job_url(), job_id(), or get_last_logs()) raise an exception, it will be unhandled and crash the program. This would prevent any further cleanup or reporting. It's safer to wrap this in its own try...except block to gracefully handle potential errors during job info retrieval.

Suggested change
result.job_url = runner.job_url()
result.job_id = runner.job_id()
if result.job_id:
result.last_logs = runner.get_last_logs()
try:
result.job_url = runner.job_url()
result.job_id = runner.job_id()
if result.job_id:
result.last_logs = runner.get_last_logs()
except Exception as e:
logger.warning(f'Failed to get job info from runner: {e}')

rather than exit early

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
@aslonnie aslonnie force-pushed the lonnie-260130-joburl branch from 404f20d to 85ad844 Compare January 30, 2026 15:39
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant