-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Cannot create WorkflowTemplate with un-supplied inputs #2869
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks goods. Need tests.
@@ -172,7 +175,13 @@ func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespaced | |||
} | |||
|
|||
if !opts.IgnoreEntrypoint { | |||
_, err = ctx.validateTemplateHolder(&wfv1.WorkflowStep{Template: wf.Spec.Entrypoint}, tmplCtx, &wf.Spec.Arguments, map[string]interface{}{}) | |||
var args wfv1.ArgumentsProvider | |||
args = &wf.Spec.Arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
args = &wf.Spec.Arguments | |
args := &wf.Spec.Arguments |
Instead of var args wfv1.ArgumentsProvider
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FakeArgument is a separate struct. ArgumentsProvider
is a common interface that used to pass either wfv1. Argument or FakeArgument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, of course!
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
@sarabala1979 I think this bug fix need back-porting to v2.8? |
yes we need to do it |
The combination of this issue and the fact that 2.7.x doesn't support "{{workflow.status}}" for onExit templates of workflow-templates means we're waiting anxiously for this fix to go in. Is there an ETA on 2.8.1? |
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
. Cannot create WorkflowTemplate with unsupplied inputs #2857