-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
CronWorkflow gets scheduled on schedule change if new schedule is between current time and last schedule. #7182
Comments
I'll take a look |
I think that the controller behaves as if the workflow was missed, and since no |
Yup, that's my thought as well |
I have the same issue with 3.1.1. Using |
@simster7 can you please look into this issue? |
Yes, I'll look |
I took a look.
This is correct. When you edit a cron workflow and it gets reloaded by the workflow controller, it has no way of knowing if a change was made to the Two ways forward:
|
Summary
I have noticed that CronWorkflows get executed even when they are not scheduled to do so. This happens if you change the schedule of the cronworkflow and put it in another time, that is after the time of the previous schedule, but before current time.
I think that the workflow controller checks the new schedule, and sees that a cronworkflow should have been executed in the meantime, triggering it.
What is more strange though is that argo cron list doesn't capture this behavior, so pods are being scheduled, but you can not find through argo.
Diagnostics
I am using:
Argo Workflows version 3.2.0
Kubernetes version 1.21.1
Executor: PNS
To replicate. Let's say it is 13:50 and we want to schedule a CronWorkflow that executes at 14:00 each day:
Create this CronWorkflow:
A Workflow will be created at 14:00 correctly. However, let's say the time now is 14:10 and we decide that for the next days, we want the schedule to be at 14:05 instead of 14:00.
Change the cronworkflow to:
and do
kubectl apply -f test.yaml
This will trigger a new workflow even though the time now is 14:10 (5 minutes after the supposed new schedule).
However using argo cron list, in the LAST RUN field we get workflow that was execute at 14:00 and not at the 14:05.
So two things here.
The expected behavior for me would be to execute the CronWorkflow on the schedule.
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
The text was updated successfully, but these errors were encountered: