Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version 1.0

workflow break_with_stderr {

output {
File load_data_csv = select_first([stdout(), stderr()])
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: stderr_stdout_workflow_body
testFormat: workflowfailure

files {
workflow: failures/stderr_stdout_workflow_body/stderr_stdout_workflow_body.wdl
}

metadata {
workflowName: break_with_stderr
status: Failed
"failures.0.message": "Workflow failed"
"failures.0.causedBy.0.message": "Failed to evaluate 'break_with_stderr.load_data_csv' (reason 1 of 2): Evaluating select_first([stdout(), stderr()]) failed: stdout is not implemented at the workflow level, Failed to evaluate 'break_with_stderr.load_data_csv' (reason 2 of 2): Evaluating select_first([stdout(), stderr()]) failed: stderr is not implemented at the workflow level"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I really appreciate how our error handling reports both errors on the same line!

}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object EngineFunctionEvaluators {
ioFunctionSet: IoFunctionSet,
forCommandInstantiationOptions: Option[ForCommandInstantiationOptions]
)(implicit expressionValueEvaluator: ValueEvaluator[ExpressionElement]): ErrorOr[EvaluatedValue[WomSingleFile]] =
EvaluatedValue(WomSingleFile(ioFunctionSet.pathFunctions.stdout), Seq.empty).validNel
ErrorOr(EvaluatedValue(WomSingleFile(ioFunctionSet.pathFunctions.stdout), Seq.empty))
}

implicit val stderrFunctionEvaluator: ValueEvaluator[StderrElement.type] = new ValueEvaluator[StderrElement.type] {
Expand All @@ -60,7 +60,7 @@ object EngineFunctionEvaluators {
ioFunctionSet: IoFunctionSet,
forCommandInstantiationOptions: Option[ForCommandInstantiationOptions]
)(implicit expressionValueEvaluator: ValueEvaluator[ExpressionElement]): ErrorOr[EvaluatedValue[WomSingleFile]] =
EvaluatedValue(WomSingleFile(ioFunctionSet.pathFunctions.stderr), Seq.empty).validNel
ErrorOr(EvaluatedValue(WomSingleFile(ioFunctionSet.pathFunctions.stderr), Seq.empty))
}

private val ReadWaitTimeout = 60.seconds
Expand Down