-
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
Design Output handling #124
Comments
Note that this should probably be handled separately from the unstructured, stdout/stderr streams that build steps produce themselves. |
One more way is the Task Controller will watch for pods update and delete req. |
For the issue on stdout/stderr in Build, see knative/build#232 |
Some related work that was done designing Build CRD artifacts (shared with members of knative-dev@.) |
/assign dlorenc |
After some more investigation it appears even the stackdriver logs don't always get uploaded. I tested this in GKE 1.11 (which defaults to containerd) and the logs are even less reliably uploaded. So I think we have a few AIs now: Design and Define the mechanism for outputting files Design and Define the API for where these files should be stored Document recommendations for task authors Push on getting a reliable way to export logs |
@dlorenc @tejal29 I'm a bit confused about the scope of this task - I think this is about basically all of the results which would be made available to these endpoints: Is that right? b/c in the context of this project "outputs" can also mean the outputs from a Task, i.e. #148 so I'd like to rename this task to Note #143 is a subtask of this issue |
I think this overlaps with #148 but is also a bit more general. We need to design:
|
Ah I see, it slipped my mind that test results are in the |
Note: @tejal29 @dlorenc @aaron-prindle and I revised the description of this task to be a bit more specific |
@shashwathi were you planning to take this one on (as well as #148 ?) i just noticed its still assigned to @dlorenc so im unassigning it |
/assign @shashwathi |
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes tektoncd#200
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes tektoncd#200
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes tektoncd#200
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes tektoncd#200
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes tektoncd#200
We had been hoping to use `version` to cover two cases: 1. To allow a user to override the version of the Resource they are using (e.g. for a particular git resource, use a different revision) 2. For the case where a Task modifies a resource then provides it to the next Task, we wanted to express the modification in the version In the previous commit, we made it so that a user can change a Resource by creating a new one and specifying the new one in teh PipelineRun, and they can do the same thing via a TaskRun. For the second case, in #124 @shashwathi is designing how the output of one task will be passed to the next, and it is likely going to be via PVCs and will not need the version field. Fixes #200
I think this is done thanks to #270 @shashwathi or is there more to do? I think there were some TODOs about images in #270 but we could leave those for #216 if we wanted |
In terms of git resource, output design is done. I am not convinced that output design for resources are done yet though. To justify this issue as being done, we should support another resource too. So I am working on a PR to add support for GCS resource (input & output) in another PR. There is no issue tracking GCS resource support (I could add one and then that is like a subtask of this issue) WDYT @bobcatfish ? |
That sounds great to me @shashwathi ! :D 🎉 |
@shashwathi i just noticed that it seems like you can provide a resource as an output without actually specifying it as an output - for example in the end to end tests we write to a git Do you have any thoughts on how we can make |
(maybe i should make a new issue to discuss this inputs vs outputs thing - seems relevant to this issue too tho!) |
Yes I do. A resource can be declared one of these ways output only
output and input
input only
Example : In the following pipeline task2 cannot declare input
I think yaml is messed up but I hope you understood my point. |
In this e2e test I considered pipelinerun task resources inputs and output to form construct taskrun inputs and outputs. |
I'm actually playing around with some of this right now (I'm using input + output linking to make an e2e test for #168) so I could add some validation here! |
I finally had a chance to look at this more carefully and I think that looks good! There is one case which is a bit weird around how to use But on a related note I wrote up a doc with some proposed changes to how we bind |
While working on creating an end to end test for tektoncd#168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. This is the first of a couple follow up commits to add more validation: this one makes sure that extra resources are not provided (e.g. if you typo-ed a param with a default value, you may never know your param was being ignored). (Shout out to @vdemeester - I updated the reconciler tests both before and after his test refactoring, and it was nearly impossible to understand the tests before his builders were added: the builders made it waaaaay easier! 🙏 Follow up on #124
While working on creating an end to end test for tektoncd#168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. This is the first of a couple follow up commits to add more validation: this one makes sure that extra resources are not provided (e.g. if you typo-ed a param with a default value, you may never know your param was being ignored). Some minor changes: * Combined 3 test cases in the taskrun reconciler into one test (testing templating with default params). * Reorganized logic in some reconciler test failures so that `Fatalf` won't prevent the dev from seeing informative failure info (specifically the condition tends to have a reason that explains why the case is failing) (Shout out to @vdemeester - I updated the reconciler tests both before and after his test refactoring, and it was nearly impossible to understand the tests before his builders were added: the builders made it waaaaay easier! 🙏 Follow up on #124
While working on creating an end to end test for tektoncd#168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. This is the first of a couple follow up commits to add more validation: this one makes sure that extra resources are not provided (e.g. if you typo-ed a param with a default value, you may never know your param was being ignored). Some minor changes: * Combined 3 test cases in the taskrun reconciler into one test (testing templating with default params). * Reorganized logic in some reconciler test failures so that `Fatalf` won't prevent the dev from seeing informative failure info (specifically the condition tends to have a reason that explains why the case is failing) (Shout out to @vdemeester - I updated the reconciler tests both before and after his test refactoring, and it was nearly impossible to understand the tests before his builders were added: the builders made it waaaaay easier! 🙏 Follow up on #124
While working on creating an end to end test for tektoncd#168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. While adding this validation I _really_ struggled to understand how the `providedBy` clause actually works. I've updated the docs with my best understanding of how it is currently working. Fortunately in tektoncd#320 we will be simplifying how this works! This is follow-up work for #124
While working on creating an end to end test for tektoncd#168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. While adding this validation I _really_ struggled to understand how the `providedBy` clause actually works. I've updated the docs with my best understanding of how it is currently working. Fortunately in tektoncd#320 we will be simplifying how this works! This is follow-up work for #124
While working on creating an end to end test for #168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. While adding this validation I _really_ struggled to understand how the `providedBy` clause actually works. I've updated the docs with my best understanding of how it is currently working. Fortunately in #320 we will be simplifying how this works! This is follow-up work for #124
While working on creating an end to end test for #168, @dlorenc and I had a very hard time determining why our pipeline wasn't working as expected - it turned out that we were using the wrong resource name in our `providedBy` clauses. This is the first of a couple follow up commits to add more validation: this one makes sure that extra resources are not provided (e.g. if you typo-ed a param with a default value, you may never know your param was being ignored). Some minor changes: * Combined 3 test cases in the taskrun reconciler into one test (testing templating with default params). * Reorganized logic in some reconciler test failures so that `Fatalf` won't prevent the dev from seeing informative failure info (specifically the condition tends to have a reason that explains why the case is failing) (Shout out to @vdemeester - I updated the reconciler tests both before and after his test refactoring, and it was nearly impossible to understand the tests before his builders were added: the builders made it waaaaay easier! 🙏 Follow up on #124
Expected Behavior
We should design how outputs should be handled by the controllers. This includes validation and fetching (uploading, querying, storing, etc.) to make them available to other Tasks that depend on them.
Outputs can be anything, e.g.:
Each Task may have 0 or more Outputs.
Requirements
- The Task's steps should have the output volume mounted
- Each Resource should have it's own hooks for Validation
- The TaskRun controller should call the Validation hooks after a Task completes and set status to Failed if the Validation fails
digest
to an image, or adding/changing arevision
on a git resourceFor completing this issue, please implement one type of Resource with Validation, e.g. for Test results (which would be logs written to a file) or a generic File resource (which would only have to exist to be Valid).
If the above Task is used in a taskRun, it should be validated that it actually created the output it claimed it would create.
The File resource should be updated with the names of the files that were created.
If a subsequent Task in a Pipeline depends on the file Resource created by that Task, it should be provided with the file(s) created automatically.
Actual Behavior
Outputs do not currently do anything, and a generic "file" type resource does not yet exist.
Additional Info
Some ideas:
Something else?
The text was updated successfully, but these errors were encountered: