Repository navigation
Conversation
Endpoint.run_sync and Job.output returned None for a job that ended FAILED, TIMED_OUT or CANCELLED, and dropped the job's error. A failed job looked the same as a handler that returned None. - New runpod.error.JobError carries job_id, status and error. - Endpoint.run_sync, Job.output and the asyncio Job.output raise it for any final state other than COMPLETED. - COMPLETED jobs return their output as before, including None. SLS-1003
This branch has not been deployed
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.
What
Endpoint.run_syncandJob.outputreturnedNonewhen a job endedFAILED,TIMED_OUTorCANCELLED, and the job'serrorwas dropped. A failed job looked the same as a handler that returnedNone:Changes:
runpod.error.JobError(RunPodError)withjob_id,statusanderror.Endpoint.run_sync,Job.outputand the asyncioJob.outputraise it for any final state other thanCOMPLETED. The asyncio docstring already saidoutput()raises when the job fails.COMPLETEDjobs return their output as before, includingNone.CANCELLEDis now handled the same as the other final states inrun_sync, which previously only checkedCOMPLETED,FAILEDandTIMED_OUT.Behavior change
Code that checked
result is Noneto detect a failure now gets aJobErrorinstead. Raising was chosen over returning the error so a failure can't be silently treated as a result. It matchesrunpod.apps, which raisesRemoteExecutionErrorfor failed jobs.Test plan
tests/test_endpoint/test_failed_jobs.py:run_syncraises with status and error forFAILED,TIMED_OUTandCANCELLEDrun_syncraises when a polled job failsCOMPLETEDjob with no output still returnsNoneJob.outputraises on every call after a failureerrorfield still names the statusJob.outputraises on failuremake quality-check(2781 passed)run_syncreturnedNone; with this changerun_syncandrun().output()raiseJobErrorwith statusFAILEDand the handler's error message. A successful call still returns its output.