test: auto-retry ollama tests on transient ReadTimeout#1369
Merged
ajbozarth merged 1 commit intoJul 6, 2026
Merged
Conversation
Loaded CI runners occasionally stall a non-streaming Ollama request past the backend's read timeout, surfacing as httpx.ReadTimeout. A fresh request reliably succeeds, so stamp a pytest-rerunfailures flaky marker on ollama-marked tests gated by only_rerun="ReadTimeout" — transient stalls retry, genuine assertion/logic failures still fail on first run. Closes generative-computing#1367 Assisted-by: Claude Code Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
8 tasks
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.
Pull Request
Issue
Fixes #1367
Description
Loaded CI runners occasionally stall a non-streaming Ollama request past the backend's 300 s read timeout, surfacing as
httpx.ReadTimeoutand failing unrelated PRs. A rerun reliably passes — the stall is a transient dead connection, not slow inference, so a fresh request succeeds. (Confirmed from run 28479500311: the failure fired exactly 300 s after the prior test, on a trivial "Say 'hi'" prompt against an already-warm model. The 300 s timeout was added in #1302 to convert a silent 15-minute hang into a prompt failure; this completes that "fail fast, then recover" intent.)pytest_collection_modifyitemsstamps aflakymarker on everyollama-marked test (no per-test annotations):only_rerun="ReadTimeout"means genuine assertion/logic failures still fail on the first run and are never masked. Retries are scoped to allollamatests since the stall isn't telemetry-specific — telemetry is just the densest cluster of consecutive non-streaming calls. Widening to alle2elater is a one-line change to the marker gate.Testing
Verified: the real ReadTimeout flake reproduced locally and passed on auto-retry; a synthetic
httpx.ReadTimeoutretried twice while an injectedAssertionErrorfailed immediately with no rerun.Attribution
Adding a new component, requirement, sampling strategy, or tool?