release 1.18.1: FR mon badges + stage-lfp host-podman + suite keep mode

This commit is contained in:
Hernâni Marques 2026-07-19 08:45:44 +02:00
parent 84588f2648
commit 7b3a345b7d
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
5 changed files with 154 additions and 58 deletions

View file

@ -323,7 +323,15 @@ def classify(line: str) -> str:
# Double-line box frames from section() → section (no sum-* paint)
if re.match(r"^\s*[╔╚].*═", line) or re.match(r"^\s*║\s", line):
return "section"
if "--- ERRORS" in u or "ERRORS ·" in u or "ERRORS (" in u:
# EN + FR section headers (i18n_tag ERROR→ERREUR, ERRORS→ERREURS)
if (
"--- ERRORS" in u
or "--- ERREURS" in u
or "ERRORS ·" in u
or "ERREURS ·" in u
or "ERRORS (" in u
or "ERREURS (" in u
):
return "meta"
if "numbered checks" in low:
return "meta"
@ -350,14 +358,15 @@ def classify(line: str) -> str:
return "sum-block"
return "blocker"
# Only real check badges (not free-text "ERROR" inside commit messages,
# and not SUMMARY count rows like " [ ERROR ] 3")
if re.search(r"\s*ERROR\b|\[\s*ERROR\b", u):
# and not SUMMARY count rows like " [ ERROR ] 3").
# French console (i18n_tag): ERROR→ERREUR, WARN→AVERT (v1.18.1).
if re.search(r"\s*(?:ERROR|ERREUR)\b|\[\s*(?:ERROR|ERREUR)\b", u):
if not is_numbered_check_line(line):
return "sum-err"
return "error"
if re.search(r"\bERROR monpages\b", line, re.I):
return "error"
if re.search(r"\s*WARN\b|\[\s*WARN\b", u):
if re.search(r"\s*(?:WARN|AVERT)\b|\[\s*(?:WARN|AVERT)\b", u):
if not is_numbered_check_line(line):
return "sum-warn"
return "warn"
@ -508,11 +517,25 @@ def extract_errors(lines: list[str]) -> list[str]:
timeout_detail = ""
in_block = False
for ln in lines:
if "--- ERRORS" in ln or "ERRORS (failed" in ln or "RUN TIMEOUT · extraordinary" in ln:
u = ln.upper()
if (
"--- ERRORS" in u
or "--- ERREURS" in u
or "ERRORS (FAILED" in u
or "ERREURS (CONTROLES" in u
or "ERREURS (FAILED" in u
or "RUN TIMEOUT · EXTRAORDINARY" in u
):
in_block = True
continue
if in_block:
if ln.strip().startswith("---") or "[ SUMMARY" in ln or "totals:" in ln:
if (
ln.strip().startswith("---")
or "[ SUMMARY" in ln
or "[ RESUME" in u
or "totals:" in ln.lower()
or "totaux :" in ln.lower()
):
in_block = False
continue
m = ERR_BULLET_RE.match(ln)
@ -522,10 +545,15 @@ def extract_errors(lines: list[str]) -> list[str]:
timeout_detail = body
else:
errs.append(body)
elif "ERROR" in ln.upper() and ln.strip() and not is_run_timeout_text(ln):
elif ("ERROR" in u or "ERREUR" in u) and ln.strip() and not is_run_timeout_text(ln):
errs.append(ln.strip())
# Only real check badges (not INFO text mentioning thresholds like "… ERROR (0=disable)")
if re.search(r"\s*ERROR\b|\[\s*ERROR\b", ln, re.I) and "--- ERRORS" not in ln:
# FR: i18n_tag ERROR→ERREUR (v1.18.1)
if (
re.search(r"\s*(?:ERROR|ERREUR)\b|\[\s*(?:ERROR|ERREUR)\b", ln, re.I)
and "--- ERRORS" not in u
and "--- ERREURS" not in u
):
if is_run_timeout_text(ln):
if "run.timeout-01" in ln.lower() or "RUN_TIMEOUT exceeded" in ln:
timeout_detail = re.sub(r"\s+", " ", strip_ansi(ln)).strip()
@ -534,8 +562,10 @@ def extract_errors(lines: list[str]) -> list[str]:
continue
if classify(ln) not in ("error", "blocker"):
continue
body = re.sub(r"^.*\bERROR\b\s*\]?\s*", "", ln, flags=re.I).strip(" ·")
if body and body not in errs and "failed — see" not in body.lower():
body = re.sub(
r"^.*\b(?:ERROR|ERREUR)\b\s*[\]┐]?\s*", "", ln, flags=re.I
).strip(" ·")
if body and body not in errs and "failed — see" not in body.lower() and "echec — voir" not in body.lower():
if re.search(
r"#\d+|www\.|e2e\.|auth401\.|versions\.|inside\.|surface\.|aptdeploy\.",
body,
@ -1699,13 +1729,15 @@ STICKY_JS = """
return true;
}
var t = (el.textContent || "").replace(/\u00a0/g, " ").trim();
// Pure box-drawing / whitespace chrome (no literal box glyphs in source
// those used to appear as "weird chars" in Python SyntaxWarning output).
// Skip pure chrome lines (spaces/tabs/newlines/hyphen + Unicode box-drawing).
// Do NOT use a JS character-class regex with box glyphs here: when this
// script is embedded in a Python string, Python emits SyntaxWarning for
// sequences like \\- and the glyphs show up as noise in mon logs.
if (!t.length) return true;
for (var bi = 0; bi < t.length; bi++) {
var bc = t.charCodeAt(bi);
if (bc === 32 || bc === 9 || bc === 10 || bc === 13 || bc === 0x2d) continue; // sp/tab/nl/cr/-
if (bc >= 0x2500 && bc <= 0x257f) continue; // box drawing
if (bc === 32 || bc === 9 || bc === 10 || bc === 13 || bc === 0x2d) continue;
if (bc >= 0x2500 && bc <= 0x257f) continue; // U+2500U+257F box drawing
return false;
}
return true;