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

jobs: don't reset next_run when resuming active schedules #69571

Merged
merged 1 commit into from
Sep 2, 2021

Conversation

pbardea
Copy link
Contributor

@pbardea pbardea commented Aug 30, 2021

Consider an active schedule that was created with a specific first_run
time. The first_run would populate the next_run_time on the schedule.
The resumption of this schedule before it executed would re-evaluate the
next runtime based off the schedule's recurrence.

This commit changes the scheduling system to only recompute the next run
time on paused schedules.

Release justification: bug fix
Release note (bug fix): Fix a bug where resuming an active schedule
would always reset its next run time. This was sometimes undesirable
with schedules that had a first_run option specified.

@pbardea pbardea requested review from adityamaru, miretskiy and a team August 30, 2021 14:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@pbardea pbardea removed the request for review from a team August 30, 2021 14:09
@pbardea pbardea force-pushed the schedule-resumption branch from 13b09e7 to 1eac30f Compare August 31, 2021 15:13
@pbardea pbardea force-pushed the schedule-resumption branch 2 times, most recently from 9cf5c8b to be27000 Compare September 1, 2021 20:21
Consider an active schedule that was created with a specific first_run
time. The first_run would populate the next_run_time on the schedule.
The resumption of this schedule before it executed would re-evaluate the
next runtime based off the schedule's recurrence.

This commit changes the scheduling system to only recompute the next run
time on paused schedules.

Release justification: bug fix

Release note (bug fix): Fix a bug where resuming an active schedule
would always reset its next run time. This was sometimes undesirable
with schedules that had a first_run option specified.
@pbardea pbardea force-pushed the schedule-resumption branch from be27000 to 3e0bbe1 Compare September 2, 2021 14:19
@pbardea
Copy link
Contributor Author

pbardea commented Sep 2, 2021

TFTR
bors r+

@craig
Copy link
Contributor

craig bot commented Sep 2, 2021

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 2, 2021

Build succeeded:

@craig craig bot merged commit 2a33514 into cockroachdb:master Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants