Repository navigation
feat(gate): stop a gate after 30 minutes by default, and take --timeout in minutes - #55
Merged
Merged
Conversation
…ut in minutes The bound on one gate run moves from 10 to 30 minutes, so a suite that legitimately takes longer than ten is no longer killed as check.timed-out. scc check and scc validate accept --timeout <minutes> to move it for one run; on validate it implies --checks. The value is never written to the manifest, and a timed-out finding now names the limit it was held to. Plan: plans/gate-timeout-30m.md
A minute count above MaxInt64/time.Minute wrapped when multiplied, giving a bound nobody asked for. It is now a usage error, like zero or a negative. Plan: plans/gate-timeout-30m.md
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.
What changed
gate.Timeoutbecomesgate.DefaultTimeout = 30 * time.Minute.scc checkandscc validateaccept--timeout <minutes>to move the bound for one run. Onvalidateit implies--checks, since a bound with no gates to apply to would be silently ignored.gate.Config.Timeout(json:"-"), so it is never written to the manifest;Config.Limit()falls back to the default for zero.check.timed-outfinding now names the limit the gate was held to (Result.Limit), since it is no longer a constant.--timeoutof 0, a negative, a non-number, or a value too large to fit atime.Durationis a usage error (exit 1).Plan:
plans/gate-timeout-30m.mdHow it was verified
TestLimitDefaults,TestRunStopsAtTheLimit(gate); timed-out finding names the limit (validate);TestCheckTimeoutTakesPositiveMinutes,TestValidateTimeoutRunsTheGates(cli).scc validate --checksexits 0: build, format, lint, and test gates pass (1009 tests, 86.2% coverage).Reviews
--timeoutoverflow when multiplied into atime.Duration: fixed in the second commit, which rejects values aboveMaxInt64/time.Minute.--timeoutlowers the bound for a run.