Skip to content

Commit

Permalink
make the max discovered files error a "proper" job error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias authored and hujambo-dunia committed Mar 1, 2024
1 parent f6f17f7 commit 4140efd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
check_output,
DETECTED_JOB_STATE,
)
from galaxy.tool_util.parser.stdio import StdioErrorLevel
from galaxy.tools.evaluation import (
PartialToolEvaluator,
ToolEvaluator,
Expand Down Expand Up @@ -1939,7 +1940,13 @@ def fail(message=job.info, exception=None):
self.discover_outputs(job, inp_data, out_data, out_collections, final_job_state=final_job_state)
except MaxDiscoveredFilesExceededError as e:
final_job_state = job.states.ERROR
job.job_messages = [str(e)]
job.job_messages = [
{
"type": "internal",
"desc": str(e),
"error_level": StdioErrorLevel.FATAL,
}
]

for dataset_assoc in output_dataset_associations:
if getattr(dataset_assoc.dataset, "discovered", False):
Expand Down

0 comments on commit 4140efd

Please sign in to comment.