Skip to content

Commit

Permalink
fix: multi-merge case when key is not used
Browse files Browse the repository at this point in the history
Signed-off-by: zjgemi <[email protected]>
  • Loading branch information
zjgemi committed Mar 28, 2024
1 parent 0f2f823 commit 74e1bd8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/dflow/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,19 @@ def merge_step_output_artifact(art, parent):
step.inputs.parameters["dflow_artifact_key"] = \
InputParameter(value="{{inputs.parameters."
"dflow_artifact_key}}")
if step.prepare_step is not None and art.name in \
step.prepare_step.outputs.artifacts:
# for multi-merge, save output artifact of inner
# slices all together
step.prepare_step.template.inputs.parameters[
"dflow_artifact_key"] = InputParameter()
step.prepare_step.inputs.parameters[
"dflow_artifact_key"] = InputParameter(
value="{{inputs.parameters."
"dflow_artifact_key}}")
merge_output_artifact(
step.prepare_step.template.outputs.artifacts[
art.name], None)
merge_output_artifact(
template.outputs.artifacts[art.name], template)

Expand Down

0 comments on commit 74e1bd8

Please sign in to comment.