-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
KS-198: Workflow Spec Approval #13181
Conversation
e51572c
to
137ed53
Compare
0a8bc3f
to
fabdd61
Compare
fabdd61
to
6016360
Compare
core/services/feeds/service.go
Outdated
@@ -1128,6 +1180,24 @@ func (s *service) generateJob(ctx context.Context, spec string) (*job.Job, error | |||
js, err = ocrbootstrap.ValidatedBootstrapSpecToml(spec) | |||
case job.FluxMonitor: | |||
js, err = fluxmonitorv2.ValidatedFluxMonitorSpec(s.jobCfg, spec) | |||
case job.Workflow: | |||
// TODO what the right way to validate a workflow spec? |
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.
@HenryNguyen5 to confirm
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.
This needs to be merged, handling it after CRIB #13125
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.
what is the eta for that? this feature is largely independent of validation details and needs to be merged for the CLO timeline of EOM. said differently, we can update the validation logic after this if we need to change it
e7713a9
to
9659bca
Compare
9659bca
to
03d1da3
Compare
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.
lint failing - unrelated to your changes but still :/
func isWFSpec(lggr logger.Logger, spec string) bool { | ||
jobType, err := job.ValidateSpec(spec) | ||
if err != nil { | ||
// this should not happen in practice |
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.
Seems like there's a lot of duplication around validating specs. I guess it's necessary for each function individually but it appears like it's getting called up to 4 times. Not a big deal but maybe we can refactor and consolidate a bit later
@@ -1058,6 +1106,11 @@ func (s *service) observeJobProposalCounts(ctx context.Context) error { | |||
return nil | |||
} | |||
|
|||
// TODO KS-205 implement this. Need to figure out how exactly how we want to handle this. | |||
func findExistingWorkflowJob(ctx context.Context, wfSpec job.WorkflowSpec, tx job.ORM) (int32, error) { | |||
return 0, nil |
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.
Just want to highlight that without this being implemented, what this means is, if the job has always been managed through CLO then it won't be applicable, as the externalJobID should be able to find the existing job. However if the workflow was added outside CLO then that job needs to be manually removed first. If workflow specs are not being manually added by nops then technically the latter should also not be a problem. However, if we do hide the workflow job from the UI it would also mean that they can't remove the job either.
I don't think it's a problem for now but perhaps we should revisit so it's full proof. The query here is usually through a unique identifier that ties the job to the spec.
|
Add minimal code path for wf spec auto approval via feeds manager