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

Clarify docs for CronWorkflow startingDeadlineSeconds #12971

Open
3 of 4 tasks
nhavens opened this issue Apr 23, 2024 · 3 comments
Open
3 of 4 tasks

Clarify docs for CronWorkflow startingDeadlineSeconds #12971

nhavens opened this issue Apr 23, 2024 · 3 comments
Labels
area/cron-workflows area/docs Incorrect, missing, or mistakes in docs good first issue Good for newcomers solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/bug

Comments

@nhavens
Copy link

nhavens commented Apr 23, 2024

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :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.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

The CronWorkflow docs describe startingDeadlineSeconds as:

Mainly startingDeadlineSeconds can be set to specify the maximum number of seconds past the last successful run of a CronWorkflow during which a missed run will still be executed.

For example, if a CronWorkflow that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed. However, if startingDeadlineSeconds is set to a value greater than 65 (the amount of time passing between the last scheduled run time of 12:05:00 and the current controller restart time of 12:06:05), then a single instance of the CronWorkflow will be executed exactly at 12:06:05.

This does not match the logic in the implementation. Based on the code, the docs should be reworded to something like the following:

Mainly startingDeadlineSeconds can be set to specify the maximum number of seconds past the last scheduled run of a CronWorkflow during which a missed run will still be executed.

For example, if a CronWorkflow that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed. However, if startingDeadlineSeconds is set to a value greater than 5 (the amount of time passing between the last scheduled run time of 12:06:00 and the current time of 12:06:05), then a single instance of the CronWorkflow will be executed exactly at 12:06:05.

Similar changes should be made elsewhere, as the comparison is not against the last successful run, but rather the last desired/expected/scheduled run time.

tl;dr startingDeadlineSeconds should be clearly documented as the "grace period" beyond the scheduled run during which a CronWorkflow may still be executed.

Version

v3.5.5

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.

n/a

Logs from the workflow controller

n/a

Logs from in your workflow's wait container

n/a
@agilgur5 agilgur5 changed the title Clarify docs for CronWorkflow startingDeadlineSeconds Clarify docs for CronWorkflow startingDeadlineSeconds Apr 23, 2024
@agilgur5 agilgur5 added area/docs Incorrect, missing, or mistakes in docs area/cron-workflows labels Apr 23, 2024
@Joibel Joibel added the good first issue Good for newcomers label Apr 24, 2024
@Joibel
Copy link
Member

Joibel commented Apr 24, 2024

PRs welcome on this.

@agilgur5 agilgur5 added the solution/suggested A solution to the bug has been suggested. Someone needs to implement it. label Apr 24, 2024
@parambath92
Copy link

Hello @Joibel, I am interested in picking this up if nobody else is working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cron-workflows area/docs Incorrect, missing, or mistakes in docs good first issue Good for newcomers solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/bug
Projects
None yet
Development

No branches or pull requests

5 participants
@nhavens @Joibel @agilgur5 @parambath92 and others