Skip to content

Commit 8b6fb36

Browse files
committed
ci: print soak flake results on fail
1 parent 7ab65f8 commit 8b6fb36

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
22
coverage.txt
3+
.artifacts

scripts/integration-flake-repeat.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,30 @@ done
111111
echo "Wrote ${summary_md}"
112112
echo "Wrote ${attempts_tsv}"
113113

114+
# Print the computed summary to stdout so CI logs are informative on failure.
115+
echo
116+
echo "=== Flake Repeat Summary (${backend_label}) ==="
117+
cat "${summary_md}"
118+
119+
# Print failing attempts (if any) and a tail of each failing log file.
120+
if [[ "${overall_exit}" -ne 0 ]]; then
121+
echo
122+
echo "=== Failing Attempts (${backend_label}) ==="
123+
awk -F '\t' 'NR==1 || $4=="fail"' "${attempts_tsv}"
124+
125+
echo
126+
echo "=== Failing Log Tails (${backend_label}) ==="
127+
awk -F '\t' 'NR>1 && $4=="fail" {print $6}' "${attempts_tsv}" | while IFS= read -r out; do
128+
[[ -z "${out}" ]] && continue
129+
file="${artifacts_dir}/${out}"
130+
echo "--- ${file} ---"
131+
if [[ -f "${file}" ]]; then
132+
tail -n 120 "${file}"
133+
else
134+
echo "missing log file: ${file}"
135+
fi
136+
done
137+
fi
138+
114139
# Keep a non-zero exit on failures so scheduled runs surface flakes in job status.
115140
exit "${overall_exit}"

0 commit comments

Comments
 (0)