Repository navigation
Flake history: learn which failure causes a rerun does not cure (Fixes #8437) - #8438
Merged
Merged
Conversation
…#8437) The learned-flaky list is per check, so once ground-truth was learned flaky from timeouts and pull failures, a repeatable test failure in it earned a rerun on every push: PR #8169 was rerun seven times for one failing test. flake_history now tallies each first-attempt cause by outcome. A cause whose reruns failed again at least twice and passed under half the time is the job's own. ci_digest keeps a learned-flaky check's failure real when its log names failing tests and test_failure is such a cause for that check. Cached days without outcomes count as before. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Contributor
|
No description provided. |
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 #8437.
What
The shepherd reruns the first failure of any check the flake history learned is flaky. The list is per check, so a repeatable test failure in a flaky check was rerun on every push: PR #8169 was rerun seven times for one failing test and failed again each time.
flake_history: each first-attempt cause is now tallied by outcome (passed on rerun, failed again). A cause whose reruns failed again at least twice and passed under half the time is reported as the job's own (real_causes).learned()still returns the set of job names, now carrying those causes.ci_digest: a learned-flaky check's first failure staysrealwhen its log names failing tests andtest_failureis such a cause for that check. Everything else is rerun once, as before.Class
The class is "a learned list keyed too coarsely": the flaky list is keyed by check, while what a rerun cures is a cause within a check. Siblings checked:
ci_shepherd.py(box shepherd)learned()andci_digest.digest, so it gets the fixshepherd_gh.py(Actions shepherd)INFRA_RERUNS)Check
pr_gates.py --only lint affected: 2/2 pass (18 test files reach the 4 changed files).test_failureis that check's own cause.Files
4 hand-written:
tests/tools/flake_history.py,tests/tools/ci_digest.pyand their two test files.🤖 Generated with Claude Code