-
Notifications
You must be signed in to change notification settings - Fork 0
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
Output parameters not shown in case of task failure #363
Comments
Hi @florentinvintila so two things.
|
@tlawrie In the case @florentinvintila has described this is not a failure in or by Tekton to execute the task, it is the task definition/logic itself wanting to set an overall failure state, i.e. the user has specified conditions on the task input parameters that evaluate the execution result to determine if it is an application error not a Tekton error per se. So in our case with the Advanced HTTP task, the task will set output parameters on certain conditions and those include overall task failure states and it's these cases where we need to use the output parameters in further steps in the workflow, specifically what error message was generated inside the task. Or, are we saying that irrespective of whether it is an application/task generated error or Tekton has returned an error attempting to run the task no output parameters in either case will be populated on the output parameter stack? @florentinvintila Have I missed anything? |
Hey @tlawrie when you get a chance to review my latest post ... thx |
Hey @tlawrie just bugging you again ... :-) |
As far as I understand it when the execution fails (i.e. the process of the container exit), this constitutes a failure, as per the link I mentioned earlier. On failure, Tekton does not try to read/store Results. |
I think this PR would help us: tektoncd/pipeline#5064 |
Describe the bug
In the case of a task that is supposed to fail, for example the HTTP Task, where we have the http status codes that are failing (i.e. 404) and the task should return the status code and the “Response” but the task is not exiting with the status 0, it returns with an “exception”, exits with status 1
process.exit(1)
While we see the task as failed in Flow, the parameters are not populated.
What project does this issue relate to?
Boomerang Flow
To Reproduce
Run any HTTP Advance Task for a URL that would return 404 as an HTTP Code.
Environment
No response
Additional Contenxt
Expected behavior
Even when the task is failing the parameters should be shown if they are sent/ populated.
The file that may helped us with finding the reason why the parameters are not displayed was:
![image](https://user-images.githubusercontent.com/1227715/191266257-e8672312-e323-4e9f-9c57-e558f0e1c2af.png)
![image](https://user-images.githubusercontent.com/1227715/191266283-a30c6fdc-8fe4-4109-b0a1-1460d695eecd.png)
https://github.com/boomerang-io/flow.service.controller/blob/main/src/main/java/io/boomerang/kube/service/TektonServiceImpl.java
Line 502
Description: the try catch for the exception is prior to the parameters being populated.
The text was updated successfully, but these errors were encountered: