manticoresoftware/manticoresearch
AArch64 (ARM64) architecture stringAutomake Makefile.am filename
SHA-2562b5c15256e4496db4af5e66a7b3a95bbf23859aecddb822d883b1f3cb696c288
Evidence
1#!/usr/bin/env python3
2"""Report per-test CLT failures from the last 30 days of main-branch CI."""
3
4import csv
5import io
6import json
7import os
8import re
9import subprocess
10import zipfile
11from collections import Counter, defaultdict
12from datetime import datetime, timedelta, timezone
13from pathlib import Path
14
15DAYS = 30
16MIN_EXECUTIONS = 5
17SHARD = re.compile(r"clt-test-results-\d+-attempt-(\d+)/clt-test-results\.jsonl$")
18FIELDS = ("tes …
22:35… ted GitHub CLI (also follows artifact redirects)."""
23 return subprocess.check_output(["gh", "api", path])
24
25
26def pages(path, field):
27 for page in range(1, 1000):
28 sep = "&" if "?" in path else "?"
29 items = json.loads(api(f"{path}{sep}per_page=100&page={page}"))[field]
30 yield from items
31 if len(items) < 100:
32 break
33
34
35def count_results(stats, failures, run, archive, repo):
36 with zipfile.ZipFile(io.BytesIO(archive)) as zipped:
37 found = False
38 for filename in zipped.namelist():
39 match = SHARD.fullmatch(filename)
40 if not match:
41 …
42:25…
43 attempt = int(match[1])
44 for line in zipped.read(filename).splitlines():
45 if not line.strip():
46 continue
47 record = json.loads(line)
48 status = record["status"]
49 …
55:46… r occurred > failures[test][0]:
56 url = f'https://github.com/{repo}/actions/runs/{run["id"]}/attempts/{attempt}'
57 failures[test] = (occurred, url)
58 if not foun …
93:6… eturn "\n".join(lines)
94
95
96def main():
97 repo = os.environ["GITHUB_REPOSITORY"]
98 cutoff = datetime.now(timezone.utc) - timedelta(days=DAYS)
99 stats, failures = defaultdict(Counter), {}
100 runs = reports = 0
101 for run in pages(f"repos/{repo}/actions/workflows/test.yml/runs?branch=main&event=push", "workflow_runs"):
Showing the top 5 files — 1 more file (16 regions) not shown.
No evidence locations were recorded for this file. Raw result