Skip to content

How to set a workflow parameters default value #927

Answered by elliotgunton
gaborbernat asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gaborbernat - arguments cannot have defaults. 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 use default 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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by elliotgunton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #926 on January 15, 2024 09:13.