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

Log trigger not recognized if intervalSeconds is not set despite it being marked as optional #3498

Open
jmcclell opened this issue Feb 26, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jmcclell
Copy link

jmcclell commented Feb 26, 2025

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.

@jmcclell jmcclell added the bug Something isn't working label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant