Pipeline: Add ability to embed Resource declaration also when embedding Tasks in TaskRuns

Created on 5 Dec 2018  ·  10Comments  ·  Source: tektoncd/pipeline

Expected Behavior

In #262 @pivotal-nader-ziada made it possible to embed a Task Spec into a TaskRun - this way you can create a TaskRun without needing to create a Task first - the goals here are:

  1. Make it easy to migrate from knative/build to Task/TaskRun
  2. Support the use case where Builds are embedded into specs in knative/serving and are self contained

It should be possbile to put _all_ of the info required for a TaskRun into a TaskRun.spec without requiring any additional resources to exist first.

Actual Behavior

You can embed a Task spec in a TaskRun, but the Resources the TaskRun refers to must exist at the time of the TaskRun creation.

This means if you embedded a TaskRun in a knative/serving spec, you'd have to have created the required Resources beforehand.

Additional Info

Discussion about resources in the PR

design help wanted meaty-juicy-coding-work

All 10 comments

(Build functionality needs specifically GCS + Git Resource types)

Can make sense to work on alongside migrating yaml tests (#302)

@bobcatfish : I have added a design doc to discuss proposed solutions. Please comment on it and we can get better alignment 👍

https://drive.google.com/open?id=1BQDfihryPT25_kyBX0pmilBaFsASkZBlbRsUDF1RUew

Great write up @shashwathi ! I'm having trouble picking one approach over the other, so I'm interested to hear what other ppl (particularly @ImJasonH ) think.

Also would like to understand more about whether we intend to support this indefinitely or if it's more of a temporary stepping stone @ImJasonH .

@bobcatfish I think we should assume Serving will want the feature for the foreseeable future. Left comments on the doc. I like resourceSpec. 👍

I was definitely thinking only about migration and not thinking about the serving use case at all 🤦‍♀️ I'm on board with the resourceSpec solution, especially if this is long term!

For handling the GCS type, I'm leaning toward adding a new resource type specifically for the build GCS functionality.

I'm on board with the resourceSpec solution, especially if this is long term!

I think @ImJasonH @bobcatfish @pivotal-nader-ziada and I are okay with this solution so we can go ahead with this approach unless there is any objection. I will probably tackle this first.

For handling the GCS type, I'm leaning toward adding a new resource type specifically for the build GCS functionality.

I like this solution too. @pivotal-nader-ziada @bobcatfish and I are okay with this solution so lets go ahead with approach unless there is any objection. I will probably do this in follow up PR (in case we change our minds with another approach).

@tejal29 to tackle the new GCS resource, maybe in a separate issue

Looks like we've to a separate issue for the GCS resource in #415, any objections to closing this one @shashwathi ? :D

Feel free to close this issue @bobcatfish

awesome :D :tada:

Was this page helpful?
0 / 5 - 0 ratings