Expected Behavior
When a eventlistener exits processing a request abnormally, for instance when an expected header is missing, the event listener pod should log warnings as this is abnormal behavior and ideally return a non-succesful (e.g. 400 or 500 range) HTTP response code.
Actual Behavior
The event listener pod emits debug messages (actually not logged by default, as the default log level is info), and returns a 202 response code.
Motivation for change
Non-triggering eventlisteners can happen either due to user error (in our case) or because some malicious user is probing the endpoint. Enabling debug logging should not be required, as this is clearly something that can be identified up front as 'something going wrong and action is needed' - under normal operations these messages will not appear.
Requiring user to enable debug logging hampers problem resolution, as intuitively one would expect "missing secrets' to issue warnings and/or a 401 not authorized response. Enabling debugging should ideally be limited to e.g. providing logs in Issues such as these, not for day to day operations.
Steps to Reproduce the Problem
- Create an Eventlistener with a secretRef as per the example here https://tekton.dev/docs/triggers/interceptors/#bitbucket-server
- Create the
bitbucket-server-secret Secret containing the secretToken value as per the documentation
- Do not set the 'Secret' value in the Bitbucket webhook (this a user error, but needed to reproduce)
- Trigger the eventlistener - it will respond with a 202 code and 'info log' the triggering event, but ony 'debug log' the
no X-Hub-Signature header set message.
Additional Info
-
Kubernetes version:
Kubernetes Version: v1.29.14+7cf4c05 (Red Hat Openshift implementation)
-
Tekton Pipeline version:
Via Red Hat OpenShift Pipeline Operator the following...
Tekton Pipelines: v1.0.0
Tekton Triggers: v0.32.0
Pipelines as Code: v0.35.2
Tekton Chains: v0.25.1
Tekton Hub (tech-preview): v1.21.0
Tekton Results (tech-preview): v0.15.2
Manual Approval Gate (tech-preview): v0.6.0
Tekton Pruner (tech-preview): v0.1.0
Expected Behavior
When a eventlistener exits processing a request abnormally, for instance when an expected header is missing, the event listener pod should log warnings as this is abnormal behavior and ideally return a non-succesful (e.g. 400 or 500 range) HTTP response code.
Actual Behavior
The event listener pod emits debug messages (actually not logged by default, as the default log level is
info), and returns a 202 response code.Motivation for change
Non-triggering eventlisteners can happen either due to user error (in our case) or because some malicious user is probing the endpoint. Enabling debug logging should not be required, as this is clearly something that can be identified up front as 'something going wrong and action is needed' - under normal operations these messages will not appear.
Requiring user to enable debug logging hampers problem resolution, as intuitively one would expect "missing secrets' to issue warnings and/or a 401 not authorized response. Enabling debugging should ideally be limited to e.g. providing logs in Issues such as these, not for day to day operations.
Steps to Reproduce the Problem
bitbucket-server-secretSecret containing the secretToken value as per the documentationno X-Hub-Signature header setmessage.Additional Info
Kubernetes version:
Kubernetes Version: v1.29.14+7cf4c05 (Red Hat Openshift implementation)
Tekton Pipeline version:
Via Red Hat OpenShift Pipeline Operator the following...
Tekton Pipelines: v1.0.0
Tekton Triggers: v0.32.0
Pipelines as Code: v0.35.2
Tekton Chains: v0.25.1
Tekton Hub (tech-preview): v1.21.0
Tekton Results (tech-preview): v0.15.2
Manual Approval Gate (tech-preview): v0.6.0
Tekton Pruner (tech-preview): v0.1.0