How to set a workflow parameters default value #927
-
https://github.com/argoproj-labs/hera/blob/main/src/hera/workflows/parameter.py#L94 clears it, so: with WorkflowTemplate(
name="magic",
entrypoint="main",
arguments=[
Parameter(
name="primary",
description="Primary cluster to operate on.",
default="yeah",
),
],
) as workflow_template:
.... doesnt' work. Is it not possible for a template to set default values? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @gaborbernat - |
Beta Was this translation helpful? Give feedback.
Hey @gaborbernat -
arguments
cannot havedefaults
. The linked hera code links to the Argo code where args are substituted. The latest code is https://github.com/argoproj/argo-workflows/blob/1e7b2392caafdfe7e843f46357932e3e5df3fe93/workflow/common/util.go#L120-L130 which you can see does not usedefault
for the arguments. I think this is by design as argument parameters are intended to hold actual values while input parameters are a declaration in programming speak, so can have defaults for when an actual value is not provided via an argument. Feel free to create an issue upstream or use this issue for discussion.