Skip to main content

Module flake

Module flake 

Source
Expand description

Flaky verification: a verify.e2e failure that did not reproduce.

graph::run_e2e_with_retry runs a failed e2e command once more on the same commit before anything is decided from it. When that second run passes, the first failure was not a verdict on the patch, and this module does the two things that follow:

  • identifies the failure (fingerprint) without knowing the test framework, from the failure lines the saved output excerpt keeps;
  • files one queue task per distinct failure asking for the root cause (record), so ten runs hitting the same flaky test leave one task.

Best effort by construction, like followup::after_merge: a filing failure becomes a run event and never changes a verdict.

Structs§

Signature
What identifies one failure: the normalised failure lines, sorted and distinct, plus a line to show a person.

Constants§

NODE
Node name carried by Source::Agent on a filed flake task.

Functions§

file
File the task for flake, or find the unfinished one that already tracks the same failure. Returns the task id and whether this call created it.
fingerprint
A stable identifier of the failure in repo: 40 bits of FNV-1a over the repository and the Signature lines, as ten hex digits. The command is deliberately not part of it: the same failing test reached through a different command line is the same defect.
record
Record a flake in the run’s ledger and file (or find) its task. Never fails: the outcome is part of the record and of a verify event.
signature
The Signature of a failing command’s output (the excerpt magi kept) and exit code.