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

Fix cron for schedules that do not match any time #4206

Merged
merged 2 commits into from
Apr 22, 2023

Conversation

yiminc
Copy link
Member

@yiminc yiminc commented Apr 21, 2023

What changed?
Fix cron for schedules that do not match any time

Why?
Some invalid cron spec would pass the cron library's parse validation, but they don't match to any time.

How did you test it?
New unit test, and manual test:

$ tctl wf start --tq fake-tq --wt fake-wt --wtt 10 --cron "* * 31 2 *"
Error: Failed to create workflow.
Error Details: invalid CronSchedule, no time can be found to satisfy the schedule

Potential risks
No

Is hotfix candidate?
Yes

@yiminc yiminc requested a review from a team as a code owner April 21, 2023 23:39
common/backoff/cron.go Outdated Show resolved Hide resolved
@yiminc yiminc merged commit ba09219 into temporalio:master Apr 22, 2023
samanbarghi pushed a commit to samanbarghi/temporal that referenced this pull request May 2, 2023
* Fix cron for schedules that do not match any time

* Use NoBackoff
rodrigozhou pushed a commit that referenced this pull request May 13, 2023
* Fix cron for schedules that do not match any time

* Use NoBackoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants