JSON script result
vs JSON output parameters are treated differently for withParam
item aggregation
#13510
Closed
3 of 4 tasks
Labels
area/controller
Controller issues, panics
area/looping
`withParams`, `withItems`, and `withSequence`
type/bug
Milestone
Pre-requisites
:latest
image tag (i.e.quay.io/argoproj/workflow-controller:latest
) and can confirm the issue still exists on:latest
. If not, I have explained why, in detail, in my description below.What happened? What did you expect to happen?
For a workflow where we want to have a nested fan-out, i.e. process a list-of-lists, using the
.result
of a script template is treated differently from using a named output parameter when collecting results, meaning we must usestdout
script results to process a list-of-lists (which is not ideal).This is due to the controller unmarshalling individual items of the results list here
argo-workflows/workflow/controller/operator.go
Line 3244 in f8f1893
And then re-marshalling the whole results list here
argo-workflows/workflow/controller/operator.go
Line 3252 in f8f1893
Which leads to a correct input parameter passed to the inner DAG:
Individual output parameters of the fan-out are not unmarshalled during processing here
argo-workflows/workflow/controller/operator.go
Lines 3232 to 3239 in f8f1893
But are re-marshalled here
argo-workflows/workflow/controller/operator.go
Line 3259 in f8f1893
Which leads to a serialized JSON string (with quotes escaped) passed to the inner DAG:
Resulting in the error message
Investigated and confirmed with @Joibel, who tried patching the controller and got the output parameters version working, by attempting to unmarshal individual output parameters to then re-marshal them (and falling back to existing mechanism if it fails) - PR from Alan will be incoming 😄
Version(s)
v3.5.10
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: