Re-raise infrastructure errors during output collection#467
Open
ksuderman wants to merge 2 commits into
Open
Conversation
Surface ImportError, MemoryError, SystemError and infrastructure OSErrors
(e.g. disk full, I/O errors) during output collection instead of silently
downgrading them to warnings, so they fail the job rather than producing a
job that 'succeeds' with empty outputs.
Two exceptions are deliberately NOT treated as infrastructure failures and
keep flowing through the normal _allow_collect_failure handling:
* FileNotFoundError — a missing output file is expected and recoverable
(e.g. a from_work_dir output the tool legitimately did not produce, which
Galaxy represents as an empty dataset).
* HTTP 403 — Galaxy authoritatively refused the upload (dataset purged mid
job); checked before the OSError test because requests.HTTPError is itself
an OSError subclass.
jmchilton
reviewed
Jul 3, 2026
| getattr(action, "url", None) or getattr(action, "path", action), | ||
| ) | ||
| return False | ||
| if isinstance(e, OSError) and not isinstance(e, FileNotFoundError): |
Member
There was a problem hiding this comment.
Can you move this logic into allow_collect_failure? It looks like there is an abstraction esbalished for this. You'll have to add the exception to the method interface. I think that is fine.
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.
Part of #465.
Split out of #466
What this does
_collect_outputdowngraded all collection exceptions to warnings foroutput_workdiroutputs (via_allow_collect_failure). That is correct for a missingoutput, but it also swallowed genuine infrastructure failures — a disk-full or
out-of-memory during collection would surface as a "successful" job with empty outputs.
ImportError,MemoryError,SystemError, and infrastructureOSErrors(disk full, I/O errors) so they fail the job.
_allow_collect_failurehandling:FileNotFoundError— a missing output file is expected (e.g. afrom_work_diroutput a tool legitimately did not produce, which Galaxy represents as an empty
dataset).
checked before the
OSErrortest becauserequests.HTTPErroris itself anOSErrorsubclass.Branch is based on current
master.