Skip to content
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

Fixes incorrect parameters in stored templates #1725

Closed
wants to merge 3 commits into from

Conversation

simster7
Copy link
Member

@simster7 simster7 commented Nov 1, 2019

Fixes #1713. Approach was to store templates before resolution, and to do so all at once during the one-time validation sequence.

Currently not fully tested (hence why this is a Draft PR), just looking for initial feedback on the implementation.

Comment on lines +164 to +168
// Store templates
for _, template := range woc.wf.Spec.Templates {
storedTemplateName := woc.getStoredTemplateName(template.TemplateRef, template.Name, woc.tmplCtx, &wfv1.Template{Template: template.Name})
woc.storeTemplate(storedTemplateName, &template)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Store unresolved templates during one-time validation

} else {
return tmplCtx.WithTemplateBase(woc.wf), resolvedTemplate, nil
}
unresolvedTemplate := woc.wf.GetStoredOrLocalTemplate(node)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template will always need to be resolved when querying it.

@dtaniwaki
Copy link
Member

Thank you for trying to fix the issue. I talked with @jessesuen and @sarabala1979 and concluded that we should remove input/arguments resolving of nested templates and store all the intermediate templates instead because this feature is not expected, then we can simplify the logic and it will hopefully fix all the issues happening right now.

@simster7
Copy link
Member Author

simster7 commented Nov 5, 2019

@dtaniwaki Are you currently working on the fix?

@dtaniwaki
Copy link
Member

I’m working on fixing the merging strategy of nested templates.

@simster7
Copy link
Member Author

Closed in favor of #1744

@simster7 simster7 closed this Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested steps run with incorrect parameters
2 participants