Repository navigation
Conversation
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.
Fixes #177.
Summary
AttemptDelay: seconds the runner waits before retrying a failed attempt. It can be set per check or as an event-wide default in[MiscSettings]. The runner skips a retry that couldn't start before the round deadline, and stops waiting if it's shutting down.Attemptscan now also be set event-wide in[MiscSettings]; a value set on a check still wins. Negative values are rejected.Attempts * Timeout + (Attempts - 1) * AttemptDelaymust be less thanDelay - Jitter.Attempts/AttemptDelayin[MiscSettings]and in the per-check property table (attemptswasn't documented before).resultsqueue are now cleared at round start along with staletasks. After a mid-round restart the next round reuses the round ID, and leftover results from the interrupted round were being counted as the new round's.With the defaults (
Attempts = 1,AttemptDelay = 0) behavior is unchanged.Tests
engine/config/attempt_config_test.go: a rapid property test that a check is accepted exactly when its attempt budget fits inDelay - Jitterand receives the event defaults; per-check values aren't overridden;Attemptsdefaults to 1; negative values are rejected.runner/runner_test.go:waitForRetrywaits the delay, skips when the deadline is too close, and returns on cancellation.engine/engine_test.go:TestRvb_IgnoresStaleResultsFromRestartedRoundfails without the fix and passes with it.go vetandgolangci-lintpass.