Open JPZ13 opened 4 months ago
Note: I did check that the controller cron package we use is unmaintained with no new commits landing to the default branch or releases in the last four years: https://isitmaintained.com/project/robfig/cron. Maybe upgrading to a new package would solve
It's the same library that k8s CronJobs use and is well known as unmaintained, see #8348 as I linked in the Slack thread. They used this approach because of that issue.
We would expect the next scheduled time to be in however many days to the first Tuesday of the month, but we're seeing that it shows as being scheduled the Tuesday of this week:
Per Slack thread, the next scheduled time is the same in the CLI and UI so is not a UI-only bug.
Also per thread, this syntax may be considered non-standard due to buggy implementations per https://crontab.guru/tips.html (tip 1) and https://crontab.guru/cron-bug.html, the "if" part of the cron syntax is a bit wacky. As such, I'm not sure I'd consider this a bug, since an implementation might intentionally do that to match. Note that per the thread, both the UI and the CLI had the same next run, so that would explain why they're equivalent despite the UI's cron library supporting some non-standard syntax.
To be exact for better readability + accessibility and searchability:
0 4 */100,1-7 * TUE
, https://crontab.guru/#0_4_*/100,1-7_*_TUE
Pre-requisites
:latest
image tag (i.e.quay.io/argoproj/workflow-controller:latest
) and can confirm the issue still exists on:latest
. If not, I have explained why, in detail, in my description below.What happened/what did you expect to happen?
When using the CRON workaround for scheduling a workflow on the first Monday of the month, the workflow-controller and the UI display differently for when the Workflow will run next.
For a CronWorkflow with the following schedule:
We would expect the next scheduled time to be in however many days to the first Tuesday of the month, but we're seeing that it shows as being scheduled the Tuesday of this week:
This issue stems from this discussion on Slack: https://cloud-native.slack.com/archives/C01QW9QSSSK/p1715619295295039
Note: I did check that the controller cron package we use is unmaintained with no new commits landing to the default branch or releases in the last four years: https://isitmaintained.com/project/robfig/cron. Maybe upgrading to a new package would solve
Version
latest
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container