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

Do not resolve remote templates in lint #1787

Merged
merged 4 commits into from
Dec 5, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'upstream/master' into do-not-resolve-re…
…mote-templates-in-lint
  • Loading branch information
dtaniwaki committed Dec 5, 2019
commit 24097f25f05457aa9e16f4c26c49054e5eabde79
4 changes: 2 additions & 2 deletions workflow/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var _ wfv1.ArgumentsProvider = &FakeArguments{}
// ValidateWorkflow accepts a workflow and performs validation against it.
func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, wf *wfv1.Workflow, opts ValidateOpts) error {
ctx := newTemplateValidationCtx(wf, opts)
tmplCtx := templateresolution.NewContext(wftmplGetter, wf)
tmplCtx := templateresolution.NewContext(wftmplGetter, wf, wf)

err := validateWorkflowFieldNames(wf.Spec.Templates)
if err != nil {
Expand Down Expand Up @@ -160,7 +160,7 @@ func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespaced
// ValidateWorkflow accepts a workflow template and performs validation against it.
func ValidateWorkflowTemplate(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, wftmpl *wfv1.WorkflowTemplate) error {
ctx := newTemplateValidationCtx(nil, ValidateOpts{})
tmplCtx := templateresolution.NewContext(wftmplGetter, wftmpl)
tmplCtx := templateresolution.NewContext(wftmplGetter, wftmpl, nil)

// Check if all templates can be resolved.
for _, template := range wftmpl.Spec.Templates {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.