Repository navigation
fix: refuse a rerun while the date's run is in progress - #171
Merged
Merged
Conversation
A rerun request for a RUNNING date reset the trigger lock and started a
second execution beside the first, and whichever finished last decided
the date's status. Such a request, manual or automatic, now ends as
RERUN_REJECTED ("a run is in progress for <date>") with no budget spent,
and ResetTriggerLock refuses a RUNNING row so a run that takes the date
mid-request is refused too. Dry run reports the same refusal. A date
whose execution died stays RUNNING until the watchdog's stale check
closes it with SFN_TIMEOUT, which the docs now describe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A rerun request for a date whose run was still in progress reset the trigger lock and started a second execution beside the first. Both then launched the job, and whichever finished last decided whether the date read as COMPLETED or FAILED_FINAL, with both
JOB_COMPLETEDandRETRY_EXHAUSTEDpossible for one date.RERUN_REJECTEDwitha run is in progress for <date>and arerun-rejectedjob row. No budget is spent and the trigger row is untouched. The calendar and budget checks still come first and the circuit breaker after.ResetTriggerLocknow requires the row not to be RUNNING, so a run that takes the date between the read and the reset is also refused rather than doubled.DRY_RUN_RERUN_REJECTEDreports the same refusal with reasonrun in progress.sfn_timeout_secondsplus 30 minutes, 4h30m by default) has passed since the latest attempt, it publishesSFN_TIMEOUTand sets the row toFAILED_FINAL, and the request can be written again. The docs say so; there is no override.name_length_test.goreran a RUNNING date, which is the case this refuses, so it now starts from FAILED_FINAL. TwoResetTriggerLocktests on a mock that only matched the old condition string are replaced by a test on the in-memory store that covers RUNNING, COMPLETED, FAILED_FINAL and a missing row.