Description
Describe the bug
When defining a sensor that uses the log
trigger, failing to define intervalSeconds
results in an invalid trigger error.
{"level":"error","ts":1740540329.7287948,"logger":"argo-events.sensor","caller":"sensors/listener.go:395","msg":"Failed to execute a trigger","sensorName":"log-github-events","error":"inv
alid trigger log, could not find an implementation","triggerName":"log","triggeredBy":["github-event"],"triggeredByEvents":["6dbfaeac648b446f9e3162361daeb07a"],"stacktrace":"github.com/ar
goproj/argo-events/pkg/sensors.(*SensorContext).triggerWithRateLimit\n\t/home/runner/work/argo-events/argo-events/pkg/sensors/listener.go:395\ngithub.com/argoproj/argo-events/pkg/sensors.
(*SensorContext).triggerActions.func1\n\t/home/runner/work/argo-events/argo-events/pkg/sensors/listener.go:376"}
To Reproduce
Steps to reproduce the behavior:
Create a sensor of the form:
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: my-sensor
spec:
dependencies:
- name: my-source
eventSourceName: my-event-source
eventName: my-event
triggers:
- template:
name: my-trigger
log: ~
Expected behavior
I expect that the mere presence of the log
key would translate to a working log trigger given its only sub-key is meant to be optional.
While this isn't a terribly consequential bug, it was the cause of some frustration as a new user. Especially as I did not intend to make use of the interval functionality.
Environment (please complete the following information):
- Kubernetes: 1.31
- Argo Events: 1.9.5
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
Activity