-
Notifications
You must be signed in to change notification settings - Fork 417
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
Don't return HTTP 202 if a global interceptor fails #1465
Comments
We did this for performance reasons. Is putting out the log only at Error Level OK? |
Also, we have k8s events as well as cloudevents. |
Eventually the decision is up to you. I can only comment from both the user (app developer) as well as admin (cluster operator) perspective as I'm working in both worlds. As an admin knowing it to be in k8s events and having it on error level would be sufficient. Your answer "performance reasons" actually surprised me. From your mission statement Tekton is placed as CI/CD solution. So if some (mis)uses it for other cases, then the argumentation might be different, but CI/CD it is. So with CI/CD we are talking about long running processes, usually in the multiple minutes if not longer. I'm not sure which scenarios you think about, but even on large projects I wouldn't expect multiple requests per second, rather multiple requests per minute if even. So as a user I don't really care if my pipeline takes 0.1 seconds, 1 seconds or 2 seconds to start. I don't know what kind of performance issues you faced when implementing it. For me it sounds like a classic case of Premature Optimization issue. But you are the experts, I can only give an opinion from an external perspective. |
From the example your provided, it does not necessarily mean that something was wrong with the payload - the payload itself may be fine but the trigger author wanted to filter out that particular event type. One complication here is that there isn't a 1-1 mapping between an incoming event and a trigger - a single incoming event can fire multiple triggers. #931 and #1183 (comment) has some context on the issues we faced that led to the current design. (One of the few times it might make sense to actually return a 4xx error is if the incoming payload is not proper json) |
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. |
/remove-lifecycle rotten I'd like to raise yet another issue once more, with a different "outcome". Right now I'm working on an Azure RedHat OpenShift cluster with Tekton installed (via Red Hat OpenShift Pipelines operator). I don't have a good suggestion how to make this visible, but seeing failed EventListener requests somewhere (a new CRD?) would be really helpful in such a scenario. |
What about events that generated? Are they sufficient to debug? |
I have not seen any events, but I susspect the OpenShift cluster to be buggy, as I have troubles opening terminals and other things too. |
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. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. 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. |
Expected Behavior
If a global interceptor fails to process (e.g.
interceptor stopped trigger processing: rpc error: code = FailedPrecondition desc = event type is not allowed
), the event listener http response should return status code 400 Bad Request. This indicates the user, that something was wrong with his payload and (even more important) that the pipeline did not run at all.Also some artifact or at least log event with level warn/error should be created indicating that something happened
Actual Behavior
Steps to Reproduce the Problem
curl -v -H 'content-Type: application/json' -d '{}' http://localhost:8080
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
The text was updated successfully, but these errors were encountered: