mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix pick_value all_non_null empty result + parameter default unwrap.
- all_non_null mode now produces empty collection when all inputs
are null instead of erroring. Matches expected semantics where
filtering nulls can yield zero results.
- Fix _ensure_input_step_outputs_populated to unwrap {"src": "json",
"value": X} parameter defaults, matching InputParameterModule's
get_input_value() unwrap logic. Pre-populated values now consistent
with what execute() produces.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e26daf4dd5
commit
77ebeeab26
@@ -2085,13 +2085,8 @@ class PickValueModule(WorkflowModule):
|
||||
output = non_null[0]
|
||||
|
||||
elif mode == "all_non_null":
|
||||
if not non_null:
|
||||
raise FailWorkflowEvaluation(
|
||||
why=InvocationFailureExpressionEvaluationFailed(
|
||||
reason=FailureReason.expression_evaluation_failed,
|
||||
workflow_step_id=step.id,
|
||||
)
|
||||
)
|
||||
# CWL spec: all_non_null returns list of non-null values,
|
||||
# which may be empty if all inputs are null.
|
||||
output = self._create_collection_from_list(trans, invocation_step, non_null)
|
||||
|
||||
else:
|
||||
|
||||
@@ -724,7 +724,13 @@ class WorkflowProgress:
|
||||
# Determine output value from inputs_by_step_id or default
|
||||
outputs = {}
|
||||
if step.id not in self.inputs_by_step_id:
|
||||
outputs["output"] = step.get_input_default_value(NO_REPLACEMENT)
|
||||
default_value = step.get_input_default_value(NO_REPLACEMENT)
|
||||
# For parameter_input steps, unwrap {"src": "json", "value": X}
|
||||
# dicts to just X — matching the unwrap logic in
|
||||
# InputParameterModule.get_input_value().
|
||||
if step.type == "parameter_input" and isinstance(default_value, dict):
|
||||
default_value = default_value.get("value", default_value)
|
||||
outputs["output"] = default_value
|
||||
else:
|
||||
outputs["output"] = self.inputs_by_step_id[step.id]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user