Input Parameter Confusion and Differences Between WorkflowTemplate and Workflows #8711
Replies: 3 comments 3 replies
-
Please check out some relevant documentation on WorkflowTemplate and parameters here: https://github.com/argoproj/argo-workflows/blob/master/docs/workflow-templates.md#working-with-parameters |
Beta Was this translation helpful? Give feedback.
-
The workflowTemplate is, as its name suggests, a template for the execution of one or more steps. In a workflow you refer to this template for several things: 1 The workflow file is smaller, which allows for better maintenance of the library. As a template you must provide the necessary parameters for its correct execution. In a workflowTemplate you can use input parameters and workflow parameters, as needed. |
Beta Was this translation helpful? Give feedback.
-
Just to make this a little more focused on the problem being shown here, I took the yaml posted by the OP and submitted it to my cluster: $ argo submit wf.yaml --watch
Name: broken-template-inputs
Namespace: argo
ServiceAccount: unset (will run with the default ServiceAccount)
Status: Succeeded
Conditions:
PodRunning False
Completed True
Created: Fri Jun 10 12:10:35 +0200 (12 seconds ago)
Started: Fri Jun 10 12:10:35 +0200 (12 seconds ago)
Finished: Fri Jun 10 12:10:45 +0200 (2 seconds ago)
Duration: 10 seconds
Progress: 2/2
ResourcesDuration: 8s*(100Mi memory),8s*(1 cpu)
Parameters:
p1: 1
p2: 2
STEP TEMPLATE PODNAME DURATION MESSAGE
✔ broken-template-inputs main
├─✔ A broken-template-inputs-2304592408 9s
└─✔ B broken-template-inputs-2354925265 9s
$ argo template create wft.yaml
Name: broken-template-inputs
Namespace: argo
Created: Fri Jun 10 12:12:10 +0200 (1 second ago)
$ argo submit --from workflowtemplate/broken-template-inputs
time="2022-06-10T12:13:00.269Z" level=fatal msg="Failed to submit workflow: templates.main.tasks.A templates. inputs.parameters.px was not supplied" So there we have it
Thus I fail to see how this is not at least two bugs. $ argo version
argo: v3.3.6
BuildDate: 2022-05-26T01:07:24Z
GitCommit: 2b428be8001a9d5d232dbd52d7e902812107eb28
GitTreeState: clean
GitTag: v3.3.6
GoVersion: go1.17.10
Compiler: gc
Platform: windows/amd64 |
Beta Was this translation helpful? Give feedback.
-
Summary
What happened?
Trying to submit a workflow template results in an error. The equivalent non-template workflow succeeds
What version are you running?
3.3.2
Diagnostics
The following workflows are equivalent - one is a template and one is not.
running the template version will fail
running the non-template version will succeed
Template Version
Workflow Version
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
Beta Was this translation helpful? Give feedback.
All reactions