-
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
Tasks that claim to emit results but don't should fail #3497
Comments
Edit for posterity: I was wrong - a PipelineRun was never put into a failed state due to a Task dropping a result. Only if the PipelineRun couldn't fetch the assocaited PipelineSpec while trying to resolve those result references. Ignore this message! |
thanks @bobcatfish, #2701 has some discussion as well |
I feel like this depends on what we define with "producing a result". I think with the current code today is:
That said, it is probably good to continue to force tasks to produce a result like they do today (unless we introduce support for default values, and a task specifies a default), as this would help task authors and users to avoid silent failures from being ignored. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@bobcatfish do you still want to pursue this one or should we leave it for the time being? |
Note: with the new feature gate / flagging work this would be classified as a backwards incompatible change and would therefore need its own feature flag. It could be made the default for a new apiVersion, such as v1. |
Feels like we are still not 100% sure what the desired behavior is here so I'd like to keep discussing /remove-lifecycle rotten |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
I'd still like to bring this forward at some point and decide how to address this as a community - maybe as part of v1 discussions? but it hasnt been a priority yet :( /remove-lifecycle stale |
In TEP-0075, we are planning to support object results. These results embrace the optional by default behavior of JSON Schema. A task can produce an object result with a missing attribute and it won't fail. However, a subsequent task will fail if it attempts to use the missing attribute from the object result, causing the pipeline to fail. That makes the object results attributes optional if not used, and required if used. That behavior is consistent with the existing behavior reported in this issue as a bug, so wondering if we should document this behavior and close this issue? |
@bobcatfish thank you for the detailed discussion above - makes sense to distinguish between producing agreed, we can go ahead with making the |
/assign @vinamra28 |
@pritidesai: GitHub didn't allow me to assign the following users: vinamra28. Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
@vinamra28 is implementing TEP-0048 which addresses this issue |
related: #6817 |
As discussed during the API WG on 17.07, moving this to nice-to-have for v1, in favour of #6932 |
Expected Behavior
If I create a Task which claims to emit a result, but it doesn't, the TaskRun should fail, i.e. I should be able to rely on the interface a Task claims to provide.
Actual Behavior
This will only be considered a failure if something in the Pipeline tries to use the result; if nothing tries to use the result, there will be no error, but if something does try to use the result you will get an error like:
Steps to Reproduce the Problem
I took this example pipeline with results and made a few changes:
If you apply this, you will see that it runs successfully. If you add any references to the results, the run will fail.
Additional Info
Kubernetes version: v1.16.13-gke.401
Tekton Pipeline version: HEAD @ 7b5b2fa
The text was updated successfully, but these errors were encountered: