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

Execute a TaskRun without having to create a Task #249

Closed
imjasonh opened this issue Nov 21, 2018 · 4 comments
Closed

Execute a TaskRun without having to create a Task #249

imjasonh opened this issue Nov 21, 2018 · 4 comments

Comments

@imjasonh
Copy link
Member

Related to #147

Expected Behavior

As a former Build user, I should be able to create a single resource that executes requested steps and can be watched for updates.

Actual Behavior

If I want to run some steps, I first have to define a Task that specifies those steps, then invoke it with a TaskRun that references that Task.

Additional Info

One possible solution would be to have the TaskRun type take either a taskRef or a taskSpec (but not both, or neither). When a TaskRun is requested with a taskSpec, it would perform the same steps as if a Task had been created with the given spec, then invoked by the TaskRun, without creating a Task as a side effect. Tasks defined in this way can't specify parameters, but can specify inputs. Resources might also need to be able to be defined without referencing a pre-existing CRD resource.

@nader-ziada
Copy link
Member

@imjasonh @bobcatfish Its not clear what value pipeline gets from this feature. This makes us maintain build style of executing steps along with Task, TaskRun using the same code base which would lead to more complexity. Is it better to help users migrate their existing builds into tasks and ask them to run them using TaskRun? if we feel the concept of TaskRun is too much for one-off tasks, maybe we should consider the option of allowing users to run Tasks in general, but its the two different ways of running things that concerns me.

@imjasonh
Copy link
Member Author

That's a reasonable question.

I think the benefit comes in two forms:

  1. From having a lower barrier to entry and shortening the time-to-first-execution for new beginners. Instead of having to learn about the separate concepts of Tasks and TaskRuns, we can tell users to start by invoking a TaskRun, then introduce the concept of shareable, reusable Tasks.

  2. From having smoother integration with Knative Serving, where users can simply inline their (hopefully simple) TaskRun definition into a Configuration's buildSpec, and have it execute to produce the app's image prior to deployment. This is a really great developer experience for serverless app developers, and again gives them a simpler introduction to using Pipelines. Otherwise, in order to execute a task before deploying, they must first define a Task, then define a TaskRun for it in the buildSpec.

Finally, I think there's a real benefit to keeping consistency with Build, at least during the immediate period where Build users are going to start migrating to Task/TaskRun. If migration to the new world (#250) requires splitting a lot of your Build invocations into two separate CRDs, that's going to be a pretty bad experience.

@nader-ziada
Copy link
Member

good point @imjasonh, the more I think about it, the more I think Task + TaskRun for one off builds or simple building of an app might be a little too much for a lot of use cases.

@nader-ziada
Copy link
Member

/assign @pivotal-nader-ziada

@bobcatfish bobcatfish added okr This is for some internal Google project tracking and removed okr This is for some internal Google project tracking labels Feb 21, 2019
chmouel pushed a commit to chmouel/tektoncd-pipeline that referenced this issue Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants