Skip to content

Flake history: learn which failure causes a rerun does not cure, so a repeatable test failure is not rerun #8437

Closed

Description

@squid-protocol

What is wrong

The shepherd reruns the first failure of any check the flake history learned is flaky. The list is per check, so once ground-truth was learned flaky from timeouts and registry pull failures, a repeatable test failure in it also earned a rerun, on every push.

Evidence-refresh PR #8169 was rerun seven times between Nov 11 and Nov 13 for the same failing test, and failed again each time (runs 43431769423, 43402894376, 43357540518, 43338248892, 43230606089, 43050204178, 43022051550; tracked in #8420). On the fleet dashboard this is most of the "rerun failed again" count for Mainframe Ground Truth and Smoke Tests (4 and 5 on Nov 11, 4 and 3 on Nov 12).

What to change

flake_history already classifies why each first attempt failed (ci_rerun_stats: timeout, registry_pull, db2_start, ratchet, test_failure, ...). It counts causes but not their outcome.

  • Tally each cause by outcome: passed on rerun, failed again.
  • A cause is the job's own, not a flake, once its reruns failed again at least twice and passed under half the time.
  • ci_digest: a learned-flaky check whose log names failing tests is real, not flake, when test_failure is such a cause for that check.
  • Days already in the cache have no outcomes per cause; they keep counting toward the per-check list as before.

No new API calls: the causes are already read.

Activity

  1. added
    bug
    priority: high
    scope:infra
    on Nov 13, 2026
  2. added a commit that references this issue on Nov 27, 2026
    470c7c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: highscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions