feat(service check): add fail early option - #149
Merged
Conversation
Add a 'Fail early' boolean parameter to the service status check. - When enabled (default, preserving the previous behavior), the 'All the time' mode fails as soon as a deviating status is observed. - When disabled, the check keeps collecting events for the whole step duration and only fails at the end (with a past-tense message). The parameter lives in the advanced section, defaults to true both in the description and in Prepare, so existing experiments are unaffected. Only affects 'All the time' mode; 'At least once' is unchanged.
|
Claude finished @achoimet's task in 1m 45s —— View job Review completeTasks
FindingsI reviewed
No bugs, security issues, or race conditions found. Nothing to flag beyond what's already covered by the PR's own tests. Note: I was unable to run |
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Problem
The ending time of our checks isn't consistently applied, which makes experiments hard to time. This adds the per-check "fail early / fail at end" option, following the reference implementation in
extension-datadog.Change
Adds a
failEarlyboolean to the StackState service status check:All the timemode the check fails as soon as a deviating status is observed (today's behavior).Only affects
All the time;At least onceis unchanged. Parameter lives in the Advanced section, defaults totruein both the description andPrepare, so existing experiments are non-breaking.Tests
FailEarly: truein the sharedserviceCheckStatetest helper (matches the production default; the existingAll the timefailure test asserts fast-fail).status allTheTime fail at endsubtest: deviation is deferred before the timeout and reported with the past-tense message once the step ends.extservicesuite passes,go vetclean.