mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Recover step output value
in WorkflowProgress instance. Fixes running subworkflows with parameter_input steps. Fixes https://github.com/galaxyproject/galaxy/issues/8390 and allows us to get rid of one FIXME I added when working around https://github.com/galaxyproject/galaxy/issues/8248.
This commit is contained in:
@@ -2625,6 +2625,14 @@ simple_mapping(
|
||||
simple_mapping(
|
||||
model.WorkflowInvocationOutputValue,
|
||||
workflow_invocation=relation(model.WorkflowInvocation, backref="output_values"),
|
||||
workflow_invocation_step=relation(model.WorkflowInvocationStep,
|
||||
foreign_keys=[model.WorkflowInvocationStep.table.c.workflow_invocation_id, model.WorkflowInvocationStep.table.c.workflow_step_id],
|
||||
primaryjoin=and_(
|
||||
model.WorkflowInvocationStep.table.c.workflow_invocation_id == model.WorkflowInvocationOutputValue.table.c.workflow_invocation_id,
|
||||
model.WorkflowInvocationStep.table.c.workflow_step_id == model.WorkflowInvocationOutputValue.table.c.workflow_step_id,
|
||||
),
|
||||
backref='output_value'
|
||||
),
|
||||
workflow_step=relation(model.WorkflowStep),
|
||||
workflow_output=relation(model.WorkflowOutput),
|
||||
)
|
||||
|
||||
@@ -352,16 +352,10 @@ class WorkflowProgress:
|
||||
try:
|
||||
replacement = step_outputs[output_name]
|
||||
except KeyError:
|
||||
replacement = self.inputs_by_step_id.get(output_step_id)
|
||||
if connection.output_step.type == 'parameter_input' and output_step_id is not None:
|
||||
# FIXME: parameter_input step outputs should be properly recorded as step outputs, but for now we can
|
||||
# short-circuit and just pick the input value
|
||||
pass
|
||||
else:
|
||||
# Must resolve.
|
||||
template = "Workflow evaluation problem - failed to find output_name %s in step_outputs %s"
|
||||
message = template % (output_name, step_outputs)
|
||||
raise Exception(message)
|
||||
# Must resolve.
|
||||
template = "Workflow evaluation problem - failed to find output_name %s in step_outputs %s"
|
||||
message = template % (output_name, step_outputs)
|
||||
raise Exception(message)
|
||||
if isinstance(replacement, model.HistoryDatasetCollectionAssociation):
|
||||
if not replacement.collection.populated:
|
||||
if not replacement.waiting_for_elements:
|
||||
@@ -428,6 +422,8 @@ class WorkflowProgress:
|
||||
|
||||
def set_step_outputs(self, invocation_step, outputs, already_persisted=False):
|
||||
step = invocation_step.workflow_step
|
||||
if invocation_step.output_value:
|
||||
outputs[invocation_step.output_value.workflow_output.output_name] = invocation_step.output_value.value
|
||||
self.outputs[step.id] = outputs
|
||||
if not already_persisted:
|
||||
for output_name, output_object in outputs.items():
|
||||
|
||||
Reference in New Issue
Block a user