Improve timeout retry observability and test coverage#4467
Open
joshuacolvin0 wants to merge 1 commit intopmikolajczyk/nit-3341-timeout-errorsfrom
Open
Improve timeout retry observability and test coverage#4467joshuacolvin0 wants to merge 1 commit intopmikolajczyk/nit-3341-timeout-errorsfrom
joshuacolvin0 wants to merge 1 commit intopmikolajczyk/nit-3341-timeout-errorsfrom
Conversation
- Add unit tests for retry wrapper dual-counter logic (10 test cases) - Add log.Warn for non-timeout retries in retry wrapper - Replace duplicate timeout log in advanceValidations with log.Trace - Add comment documenting string-matching false-positive tradeoff - Assert proxy timeouts were consumed in system test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## pmikolajczyk/nit-3341-timeout-errors #4467 +/- ##
========================================================================
- Coverage 32.89% 29.21% -3.69%
========================================================================
Files 494 494
Lines 58331 58337 +6
========================================================================
- Hits 19189 17044 -2145
- Misses 35805 38202 +2397
+ Partials 3337 3091 -246 |
Contributor
❌ 111 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
pmikolajczyk41
requested changes
Mar 5, 2026
Comment on lines
+39
to
+43
| if r.err != nil { | ||
| promise.ProduceError(r.err) | ||
| } else { | ||
| promise.Produce(r.state) | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| if r.err != nil { | |
| promise.ProduceError(r.err) | |
| } else { | |
| promise.Produce(r.state) | |
| } | |
| promise.ProduceResult(r.state, r.err) |
Comment on lines
+47
to
+52
| func (s *testSpawner) WasmModuleRoots() ([]common.Hash, error) { return nil, nil } | ||
| func (s *testSpawner) Start(context.Context) error { return nil } | ||
| func (s *testSpawner) Stop() {} | ||
| func (s *testSpawner) Name() string { return "test" } | ||
| func (s *testSpawner) StylusArchs() []rawdb.WasmTarget { return nil } | ||
| func (s *testSpawner) Capacity() int { return 1 } |
Member
There was a problem hiding this comment.
Suggested change
| func (s *testSpawner) WasmModuleRoots() ([]common.Hash, error) { return nil, nil } | |
| func (s *testSpawner) Start(context.Context) error { return nil } | |
| func (s *testSpawner) Stop() {} | |
| func (s *testSpawner) Name() string { return "test" } | |
| func (s *testSpawner) StylusArchs() []rawdb.WasmTarget { return nil } | |
| func (s *testSpawner) Capacity() int { return 1 } | |
| func (s *testSpawner) WasmModuleRoots() ([]common.Hash, error) { return nil, nil } | |
| func (s *testSpawner) Start(context.Context) error { return nil } | |
| func (s *testSpawner) Stop() {} | |
| func (s *testSpawner) Name() string { return "test" } | |
| func (s *testSpawner) StylusArchs() []rawdb.WasmTarget { return nil } | |
| func (s *testSpawner) Capacity() int { return 1 } |
| {err: errTimeout}, | ||
| }) | ||
| _, err := launchAndAwait(t, wrapper, 1, 2) | ||
| if !errors.Is(err, errTimeout) { |
Member
There was a problem hiding this comment.
Suggested change
| if !errors.Is(err, errTimeout) { | |
| if !validator.IsTimeoutError(err) { |
Member
There was a problem hiding this comment.
maybe we want to use this utility here and in the other assertions
Comment on lines
+63
to
+72
| ctx := context.Background() | ||
| run := wrapper.LaunchWithNAllowedAttempts(nil, testRoot, allowedAttempts, allowedTimeouts) | ||
| return run.Await(ctx) | ||
| } | ||
|
|
||
| func setupWrapper(t *testing.T, results []launchResult) *ValidationSpawnerRetryWrapper { | ||
| t.Helper() | ||
| spawner := &testSpawner{results: results} | ||
| wrapper := NewValidationSpawnerRetryWrapper(spawner) | ||
| wrapper.StopWaiter.Start(context.Background(), wrapper) |
Member
There was a problem hiding this comment.
I'm wondering - shouldn't we use a common parent context and derive from it?
| @@ -59,6 +59,12 @@ func (v *ValidationSpawnerRetryWrapper) LaunchWithNAllowedAttempts(entry *valida | |||
| if nonTimeoutAttempts >= allowedAttempts { | |||
Member
There was a problem hiding this comment.
I think we should have a strong comparison here - if we allow 3 attempts, then the 3rd failure shouldn't cause an error
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.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com