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

Trigger toggle doesn't work if the trigger interval is small #3705

Open
johnkm516 opened this issue May 13, 2024 · 0 comments
Open

Trigger toggle doesn't work if the trigger interval is small #3705

johnkm516 opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working customer-request
Milestone

Comments

@johnkm516
Copy link

Describe the issue

My flow is an SQL Server trigger which queries the DB for certain rows. The trigger is set to 3 seconds, as the flow won't trigger if there are no rows in the output of the select query.

If the flow is continuously being triggered at an interval of 3 seconds, and I use the Kestra UI to disable the trigger (toggle off), it does not save properly. Despite me toggling off the trigger multiple times.

Per my tests, this happens if a triggered flow is still currently running. If a triggered flow is still running, the Kestra UI refuses to disable the trigger. You have to wait until all flows with the trigger finishes, which is impossible if the trigger is continuously triggering new flows. To fix it, I have to edit the flow to make the trigger interval > the time it would take to complete all the flows that has been triggered, wait until the flows are complete, then toggle off the trigger.

Minimal reproducible example :

id: triggertest
namespace: dev

labels:
  env: dev

tasks:

  - id: wait
    type: io.kestra.plugin.scripts.shell.Commands
    commands:
      - sleep 10
    runner: PROCESS
  - id: print_status
    type: io.kestra.core.tasks.log.Log
    message: hello

triggers:
  - id: query
    type: io.kestra.plugin.jdbc.sqlserver.Trigger
    fetch: true
    fetchSize: 30
    interval: PT3S
    password: <password?
    sql: "SELECT TOP(30) * FROM TEST_TABLE\r\n"
    stopAfter:
      - FAILED
      - WARNING
    url: jdbc:sqlserver://<uri>
    username: <username>

Environment

  • Kestra Version: 0.16.6
  • Operating System: Docker
@johnkm516 johnkm516 added the bug Something isn't working label May 13, 2024
@loicmathieu loicmathieu added this to the v0.18.0 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer-request
Projects
None yet
Development

No branches or pull requests

3 participants