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 handling with zero-padding months #8804

Merged
merged 3 commits into from
Sep 1, 2020
Merged

Conversation

notnoop
Copy link
Contributor

@notnoop notnoop commented Sep 1, 2020

Update cronexpr to pick up the fix in hashicorp/cronexpr#3 .

When the month is zero-padded (e.g. 04), the cron parser accidentally marked the month as 0 rather 4 (April), and led to an infinite loop. The upgrade ensures we parse the month value properly.

Fixes #8800

@notnoop notnoop requested a review from jrasell September 1, 2020 15:52
@notnoop notnoop self-assigned this Sep 1, 2020
@@ -632,6 +632,7 @@ type DispatchPayloadConfig struct {

const (
TaskLifecycleHookPrestart = "prestart"
TaskLifecycleHookPoststart = "poststart"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if this was meant to be included in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - this is orthogonal but needed because https://github.com/hashicorp/nomad/pull/8390/files updated api/ package without running make sync.

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@notnoop notnoop merged commit fd4735f into master Sep 1, 2020
@notnoop notnoop deleted the b-cronexpr-zero-padding branch September 1, 2020 16:22
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Freezes on crons with leading zeros in month number.
2 participants