From 433e8ac28a422440e4ca08122d638c3edb3a8056 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 24 Jul 2024 18:41:43 +0200 Subject: [PATCH] Include workflow invocation id in exception logs And downgrade "normal" invocation scheduling errors to info. --- lib/galaxy/workflow/run.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/workflow/run.py b/lib/galaxy/workflow/run.py index 463fd24d5a97..fbedaef748ce 100644 --- a/lib/galaxy/workflow/run.py +++ b/lib/galaxy/workflow/run.py @@ -251,8 +251,15 @@ def invoke(self) -> Dict[int, Any]: step_delayed = delayed_steps = True self.progress.mark_step_outputs_delayed(step, why=de.why) except Exception as e: - log.exception( - "Failed to schedule %s, problem occurred on %s.", + log_function = log.exception + if isinstance(e, modules.FailWorkflowEvaluation) and e.why.reason not in ( + "unexpected_failure", + "expression_evaluation_failed", + ): + log_function = log.info + log_function( + "Failed to schedule %s for %s, problem occurred on %s.", + self.workflow_invocation.log_str(), self.workflow_invocation.workflow.log_str(), step.log_str(), )