-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat: implement pipeline validation for unsupported states #1043
Conversation
pkg/reconciler/pipeline/validate.go
Outdated
@@ -89,6 +89,17 @@ func ValidatePipeline(pl *dfv1.Pipeline) error { | |||
return fmt.Errorf("pipeline has no sink, at least one vertex with 'sink' defined is required") | |||
} | |||
|
|||
for _, v := range pl.Spec.Vertices { |
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.
Shall we do something like below:
- Sources should have
to
, but nofrom
, - Sinks should have
from
, but noto
; - UDFs should have both.
And this can be done together with the for loop above.
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.
If this logic is in place, maybe we can remove the logic in line 165-170.
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.
+1.
pkg/reconciler/pipeline/validate.go
Outdated
@@ -89,6 +89,17 @@ func ValidatePipeline(pl *dfv1.Pipeline) error { | |||
return fmt.Errorf("pipeline has no sink, at least one vertex with 'sink' defined is required") | |||
} | |||
|
|||
for _, v := range pl.Spec.Vertices { |
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.
+1.
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
…PendingNotAvailable (numaproj#1040) Signed-off-by: Keran Yang <yangkr920208@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
…ch (numaproj#1041) Signed-off-by: Derek Wang <whynowy@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: veds-g <guptavedant2312@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: Derek Wang <whynowy@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Co-authored-by: Keran Yang <yangkr920208@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
ef81a48
to
5049c30
Compare
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com> Signed-off-by: Keran Yang <yangkr920208@gmail.com>
Partially completes #1002
Adds pipeline validation to prevent pipelines to be submitted that have: