diff --git a/pkg/compiler/validators/node.go b/pkg/compiler/validators/node.go index aa5c8eee68..c328ba2b1b 100644 --- a/pkg/compiler/validators/node.go +++ b/pkg/compiler/validators/node.go @@ -120,6 +120,10 @@ func ValidateNode(w c.WorkflowBuilder, n c.NodeBuilder, validateConditionTypes b errs.Collect(errors.NewValueRequiredErr("", "Id")) } + if n.GetId() == c.StartNodeID || n.GetId() == c.EndNodeID { + return true + } + if _, ifaceOk := ValidateUnderlyingInterface(w, n, errs.NewScope()); ifaceOk { // Validate node output aliases validateEffectiveOutputParameters(n, errs.NewScope()) diff --git a/pkg/compiler/validators/node_test.go b/pkg/compiler/validators/node_test.go index aff59e9b0d..70d72100f0 100644 --- a/pkg/compiler/validators/node_test.go +++ b/pkg/compiler/validators/node_test.go @@ -3,6 +3,8 @@ package validators import ( "testing" + "github.com/lyft/flytepropeller/pkg/compiler/common" + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core" "github.com/lyft/flytepropeller/pkg/compiler/common/mocks" @@ -33,3 +35,15 @@ func TestValidateBranchNode(t *testing.T) { } }) } + +func TestValidateNode(t *testing.T) { + n := &mocks.NodeBuilder{} + n.OnGetId().Return(common.StartNodeID) + + wf := &mocks.WorkflowBuilder{} + errs := errors.NewCompileErrors() + ValidateNode(wf, n, true, errs) + if errs.HasErrors() { + assert.NoError(t, errs) + } +}