-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Custom Tasks: question with taskSpec #3682
Comments
Very possibly! I think we should take it slow to get there and collect user feedback along the way, but there's nothing technically difficult about supporting it, and I think it could help reduce complexity if done well. Sorry if that "maybe" is not a terribly definitive answer. 🙃 |
Thanks Jason, we are building the a new custom task for our pipeline. Our use case is to have multiple users in the same namespace, so our users sometimes create the custom task with the same name. Right now we try to work around with appending a unique user string to each custom task name, so the name can be unique for each user. We would like to provide more feedback as custom task is getting more task feature in the upcoming releases. |
My 2 cents is that I think this is totally reasonable to add - esp since we support this for other Tasks (I think I've been assuming we'd support this for sure) |
Thanks @bobcatfish. |
/assign yup, this is reasonable and we have a use case. Custom task is specified using
And its classified as custom task if
@Tomcli what is your expected usage with |
/remove-kind question |
I think what's being asked for is support for inlining the custom task CR definition in the PipelineSpec, instead of only being able to reference the definition elsewhere. Something along the lines of:
(Please correct me if I'm wrong!) This is similar to how When run, the PipelineRun controller could create a
And in turn the Custom Task controller for Examples would have to understand how to interpret that and perform the custom task behavior. I don't think it's a very complicated change, but it's kind of a lot to add to the API, in the name of simplifying a case that's possible today just by referencing external CRs instead of inlining them. I'd prefer to start with a prototype at least of the controller you intend to build to take advantage of this new way to express custom tasks in a pipeline. This would help us more clearly identify the use case, and identify exactly where we can improve it. If you already have a custom task controller you're working on I'd love to hear more about it! |
We already have our own custom task controller and spec ready, here is one of our examples. The use case we have is to run the custom task inside a pipelineRun using the Tekton pipelineRun go client. We are using Kubeflow Pipeline to do this which assumes all the information for displaying the graph is under one Kubernetes resource (for tekton is the pipelineRun). For taskSpec, we want to figure out where we should add the pipeline/pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go Lines 356 to 366 in 08177fa
|
@imjasonh As @Tomcli mentioned the |
Being able to embed custom task specs in pipelines would be consistent with the existing API; to having it instead could inhibit usability of custom tasks instead. We would need to define the name of the field use to embed the spec. The only question I have, if whether support for this new field would be optional or mandatory for custom controllers. |
@imjasonh please confirm 🙏 So what we are proposing here is to mainly add a new field in the pipeline/pkg/apis/pipeline/v1alpha1/run_types.go Lines 40 to 43 in 1cd612f
pipeline/pkg/apis/pipeline/v1beta1/taskrun_types.go Lines 44 to 55 in 1cd612f
@Tomcli I am trying to understand what value is this feature adding? It will be great to be aligned with the existing API but what kind of issues would this solve? The biggest advantage of this would be to not deal with the management nightmare of those custom resources 🤔 |
Thanks @pritidesai. This feature can help us
|
In our use case, KFP is the admin for storing and managing all the PipelineRuns. We are having a hard time to track all the custom resources because they all have different APIs. |
Yep, that seems right to me. |
Alright, I took sometime to put the puzzle pieces together before writing a TEP for it. Let me know if its headed in right direction: Introduce a new field
Updating the
Now, while creating a
These changes ships the entire inlined specification with the I took an example of
So, the following sample
Initializes
Anything missing here? I have the pipeline controller changes here. |
related #3463
The current custom task can run in a pipeline using
pipeline.taskRef
. Will there be any support forpipeline.taskSpec
in the roadmap?/cc @GregDritschler @fenglixa
The text was updated successfully, but these errors were encountered: