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

Output parameters not shown in case of task failure #363

Open
florentinvintila opened this issue Sep 20, 2022 · 7 comments
Open

Output parameters not shown in case of task failure #363

florentinvintila opened this issue Sep 20, 2022 · 7 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request project: flow Tasks for Boomerang Flow

Comments

@florentinvintila
Copy link

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:
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.
image
image

@florentinvintila florentinvintila added bug Something isn't working enhancement New feature or request project: flow Tasks for Boomerang Flow labels Sep 20, 2022
@florentinvintila florentinvintila changed the title Ooyut Output parameters not shown in case of task failure Sep 20, 2022
@tlawrie
Copy link
Member

tlawrie commented Sep 20, 2022

Hi @florentinvintila so two things.

  1. Results not being populated if a task fails on non-zero exit code is actually Tekton-related logic. Tekton tracks it here: Publish results when task and pipeline runs fail tektoncd/pipeline#3749 and it is also tracked in TEP-0048 https://github.com/tektoncd/community/blob/main/teps/0048-task-results-without-results.md with what changes may be implemented to alter the current functionality.

  2. You can validate if the Flow issue is related and that this is the case by running the task and accessing the Results via the tkn CLI and seeing if they have been populated. If they haven't been populated on the result in Tekton, they won't make it to Flow.

@tlawrie tlawrie moved this to In Progress in Boomerang Flow Sep 20, 2022
@tlawrie
Copy link
Member

tlawrie commented Sep 27, 2022

Hey @amhudson @gchickma 👀

@gchickma
Copy link
Member

gchickma commented Oct 27, 2022

@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?

@gchickma
Copy link
Member

gchickma commented Nov 1, 2022

Hey @tlawrie when you get a chance to review my latest post ... thx

@gchickma
Copy link
Member

gchickma commented Nov 8, 2022

Hey @tlawrie just bugging you again ... :-)

@tlawrie
Copy link
Member

tlawrie commented Nov 13, 2022

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.

@AndreiOla
Copy link

I think this PR would help us: tektoncd/pipeline#5064
Not sure how we can show our interest in seeing this in the next release of Tekton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request project: flow Tasks for Boomerang Flow
Projects
Status: In Progress
Development

No branches or pull requests

5 participants