From 02e27f0fb1d53db419d8503514befd99bdd5942d Mon Sep 17 00:00:00 2001 From: Giulio Frasca Date: Wed, 14 Aug 2024 17:04:44 -0400 Subject: [PATCH] fix(backend): Fix broken dependantTasks in ParallelFor Signed-off-by: Giulio Frasca --- backend/src/v2/compiler/argocompiler/dag.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/v2/compiler/argocompiler/dag.go b/backend/src/v2/compiler/argocompiler/dag.go index 25885b7b6e79..523992c2a4b0 100644 --- a/backend/src/v2/compiler/argocompiler/dag.go +++ b/backend/src/v2/compiler/argocompiler/dag.go @@ -274,9 +274,10 @@ func (c *workflowCompiler) iteratorTask(name string, task *pipelinespec.Pipeline // Set up Loop Control Template loopDriverArgoName := name + "-loop-driver" loopDriverInputs := dagDriverInputs{ - component: componentSpecPlaceholder, - parentDagID: parentDagID, - task: taskJson, // TODO(Bobgy): avoid duplicating task JSON twice in the template. + component: componentSpecPlaceholder, + parentDagID: parentDagID, + task: taskJson, // TODO(Bobgy): avoid duplicating task JSON twice in the template. + iterationIndex: "0", } loopDriver, loopDriverOutputs, err := c.dagDriverTask(loopDriverArgoName, loopDriverInputs) if err != nil { @@ -356,7 +357,7 @@ func (c *workflowCompiler) iterationItemTask(name string, task *pipelinespec.Pip if err != nil { return nil, err } - driver.Depends = depends(task.GetDependentTasks()) + //driver.Depends = depends(task.GetDependentTasks()) # TODO(gfrasca): Handled already by root task iterationCount := intstr.FromString(driverOutputs.iterationCount) iterationTasks, err := c.task(