kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
12.98k stars 1.13k forks source link

ScheduleOnDates trigger shows only one next scheduled Execution at a time #5160

Open anna-geller opened 1 month ago

anna-geller commented 1 month ago

Describe the issue

screen: https://share.descript.com/view/HEks9I5NcjT

It might be a bug or not depending on how we define the behavior here. Intuitively as a user, I would expect that all scheduled dates will show up in the dashboard as next scheduled execution dates -- is it only a UI issue or is it expected backend issue that we generate only one next scheduled execution at a time?

image

If this is expected, close the issue.

Reproducer:

id: scheduled_at
namespace: company.team

tasks:
  - id: print_date
    type: io.kestra.plugin.core.log.Log
    message: Hello at {{ trigger.date }}

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.ScheduleOnDates
    timezone: Europe/Berlin
    recoverMissedSchedules: LAST
    dates:
      - 2024-12-24T17:00:00+02:00 # Christmas Eve
      - 2024-12-25T17:00:00+02:00 # Christmas Day
      - 2024-12-31T17:00:00+02:00 # New Year's Eve
      - 2025-01-01T17:00:00+02:00 # New Year's Day
      - "{{now() | dateAdd(1, 'HOURS')}}"
      - "{{now() | dateAdd(2, 'DAYS')}}"

Environment

loicmathieu commented 1 month ago

In a trigger, the next execution is a single date.

anna-geller commented 1 month ago

I expected that this special trigger would lead to multiple entries in this table - WDYT?

for this trigger I expected all dates from the list to show up here (so multiple rows for this trigger) -- If what I'm saying is not reasonable, you can close right away or move to 0.20 as no blocker for release

loicmathieu commented 1 month ago

Anyway it cannot be done for 0.20.

This table is based on the triggers table which contains one line per trigger (hard constraint). Doing what you ask is of course not impossible, but it's not easy nor a quickwin. Moving it to 0.20 so we can think of what we can do for that.