Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fa58fc3
Stabilize integration test CI
harshach Jul 16, 2026
9a1d197
Address integration stability review feedback
harshach Jul 16, 2026
6bc7820
Fix Trino integration test inserts
harshach Jul 16, 2026
93e4317
Preserve bulk search propagation on uncertain writes
harshach Jul 16, 2026
4e8fcef
Retry context extraction state updates safely
harshach Jul 16, 2026
63c72a7
Propagate only confirmed bulk search writes
harshach Jul 16, 2026
ad4bf69
Yield context extraction retries under contention
harshach Jul 16, 2026
7f400d2
Honor bulk search process failures
harshach Jul 16, 2026
751a687
Order logical suite publication across nodes
harshach Jul 16, 2026
141b0f6
Merge remote-tracking branch 'origin/main' into harshach/stabilize-fl…
harshach Jul 16, 2026
ec0acb8
Fence logical suite search publications
harshach Jul 16, 2026
ca2d606
Preserve search recovery side effects
harshach Jul 16, 2026
f8a863a
Move heavy Python shards off the root disk
harshach Jul 16, 2026
13ae49b
Support both hosted runner disk layouts
harshach Jul 16, 2026
a4e7721
Fix logical suite indexing and glossary navigation
harshach Jul 17, 2026
e0614bb
Merge branch 'main' into harshach/stabilize-flaky-integration-tests
harshach Jul 17, 2026
1d966f2
Fix Python integration test regressions
harshach Jul 17, 2026
5c11112
Merge origin/main into harshach/stabilize-flaky-integration-tests
harshach Jul 17, 2026
f67ad58
Address integration test stabilization review feedback
harshach Jul 17, 2026
160e2b1
Merge remote-tracking branch 'origin/main' into harshach/stabilize-fl…
harshach Jul 17, 2026
778c6cb
Stabilize Trino statistics integration tests
harshach Jul 17, 2026
773bad6
Fix Trino statistics reset procedure handling
harshach Jul 17, 2026
9ce7c29
Allow supported hosted runner disk sizes
harshach Jul 17, 2026
a5e3377
Make Exasol usage integration test deterministic
harshach Jul 17, 2026
8ecfcfb
Handle Exasol audit timestamps in database timezone
harshach Jul 18, 2026
179a205
Reuse page in test-suite reindex UI test
harshach Jul 18, 2026
a138e63
test(ingestion): stabilize table diff row sampling
harshach Jul 18, 2026
9085961
ci: harden ANTLR CLI installation
harshach Jul 18, 2026
b1a1cdf
test(search): stabilize relevancy fixture tokens
harshach Jul 18, 2026
a700e51
test(search): make match-type fixture explicit
harshach Jul 18, 2026
a4da699
fix(search): preserve retries across reindex promotion
harshach Jul 18, 2026
05d11d3
fix(cache): canonicalize negative-cache name keys
harshach Jul 18, 2026
b38861a
fix(search): prevent retry queue work loss
harshach Jul 19, 2026
2868d09
test(search): pass retry claim ownership tokens
harshach Jul 19, 2026
898d7aa
fix(migration): execute retry claim token alter
harshach Jul 19, 2026
b992b0e
fix(search): retain queued propagation context
harshach Jul 19, 2026
a27edcf
fix(ci): avoid false hung test outcomes
harshach Jul 19, 2026
f566c75
test(drive): isolate search upload fixtures
harshach Jul 19, 2026
955b262
test(search): isolate ranking fixture fields
harshach Jul 19, 2026
b2be15d
fix(search): query extracted context file text
harshach Jul 19, 2026
af72f4f
fix(search): route context files through asset config
harshach Jul 19, 2026
fc0a2c1
test(search): decouple file visibility from ranking
harshach Jul 19, 2026
c6fcfbc
test(ui): allow restricted metric access checks to complete
harshach Jul 19, 2026
b3524d7
test(search): isolate classification display-name lookup
harshach Jul 19, 2026
dd95b89
test(search): avoid analyzer token splitting
harshach Jul 19, 2026
8c9e18c
test(ui): align article draft persistence assertion
harshach Jul 19, 2026
c8f78b0
fix(lineage): retry transient relationship deadlocks
harshach Jul 19, 2026
ad6738c
fix(ui): correlate async import job results
harshach Jul 19, 2026
ae4360a
test(python): avoid runtime dependency pulls
harshach Jul 19, 2026
a3c8de9
Merge remote-tracking branch 'origin/main' into harshach/stabilize-fl…
harshach Jul 19, 2026
264a565
fix(events): preserve change events across offset gaps
harshach Jul 19, 2026
21c9dac
ci: keep UI reporting failures non-blocking
harshach Jul 20, 2026
d773637
Merge remote-tracking branch 'origin/main' into harshach/stabilize-fl…
pmbrull Jul 20, 2026
1b1ad0b
Merge remote-tracking branch 'origin/main' into harshach/stabilize-fl…
pmbrull Jul 20, 2026
f7a5216
Merge branch 'main' into harshach/stabilize-flaky-integration-tests
pmbrull Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
546 changes: 546 additions & 0 deletions .github/scripts/classify_playwright_outcome.py

Large diffs are not rendered by default.

257 changes: 257 additions & 0 deletions .github/scripts/classify_test_outcome.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
"""Classify a CI test process from its exit state, JUnit reports, and diagnostics."""

import argparse
import glob
import hashlib
import json
import os
import re
import subprocess
from pathlib import Path
from xml.etree import ElementTree

HANG_EXIT_CODES = {124}
HANG_PATTERN = re.compile(
r"(?:\bfork(?:ed)?(?:\s+(?:process|vm))?\b|\btest process\b|\bcommand\b|\bprocess\b)"
r".{0,80}\b(?:timed out|timeout)\b|"
r"\b(?:timed out|timeout)\b.{0,80}"
r"(?:\bfork(?:ed)?(?:\s+(?:process|vm))?\b|\btest process\b|\bcommand\b|\bprocess\b)",
re.IGNORECASE | re.DOTALL,
)


def _local_name(tag: str) -> str:
return tag.rsplit("}", 1)[-1]


def _junit_counts(
report_files: list[Path],
) -> tuple[dict[str, int], list[dict[str, str]], list[str]]:
totals = {"tests": 0, "failures": 0, "errors": 0, "skipped": 0}
failed_tests = []
parse_errors = []
for report_file in report_files:
try:
root = ElementTree.parse(report_file).getroot()
except (ElementTree.ParseError, OSError) as error:
parse_errors.append(f"{report_file}: {error}")
continue

test_cases = [
element for element in root.iter() if _local_name(element.tag) == "testcase"
]
if test_cases:
totals["tests"] += len(test_cases)
for test_case in test_cases:
children_by_name = {
_local_name(child.tag): child for child in test_case
}
child_names = set(children_by_name)
totals["failures"] += int("failure" in child_names)
totals["errors"] += int("error" in child_names)
totals["skipped"] += int("skipped" in child_names)
for failure_type in ("failure", "error"):
failure = children_by_name.get(failure_type)
if failure is None:
continue
class_name = test_case.attrib.get("classname", "")
test_name = test_case.attrib.get("name", "")
failed_tests.append(
{
"id": f"{class_name}#{test_name}",
"className": class_name,
"name": test_name,
"type": failure_type,
"message": failure.attrib.get("message", "")[:1000],
"report": str(report_file),
}
)
continue

if _local_name(root.tag) in {"testsuite", "testsuites"}:
for key in totals:
try:
totals[key] += int(root.attrib.get(key, "0"))
except ValueError:
parse_errors.append(
f"{report_file}: invalid {key} count {root.attrib.get(key)!r}"
)
return totals, failed_tests, parse_errors


def _contains_process_timeout(diagnostic_files: list[Path]) -> bool:
for diagnostic_file in diagnostic_files:
try:
with diagnostic_file.open("rb") as file_handle:
content = file_handle.read(2 * 1024 * 1024).decode(
"utf-8", errors="replace"
)
except OSError:
continue
if HANG_PATTERN.search(content):
return True
return False


def _file_manifest(files: list[Path]) -> list[dict[str, object]]:
manifest = []
for file_path in files:
try:
digest = hashlib.sha256(file_path.read_bytes()).hexdigest()
manifest.append(
{
"path": str(file_path),
"bytes": file_path.stat().st_size,
"sha256": digest,
}
)
except OSError as error:
manifest.append({"path": str(file_path), "error": str(error)})
return manifest


def classify_outcome(
step_outcome: str,
exit_code: int | None,
report_files: list[Path],
diagnostic_files: list[Path],
) -> dict[str, object]:
tests, failed_tests, parse_errors = _junit_counts(report_files)
reasons = []

if step_outcome == "cancelled":
classification = "cancelled"
reasons.append("The test step was cancelled.")
elif exit_code in HANG_EXIT_CODES or (
step_outcome != "success" and _contains_process_timeout(diagnostic_files)
):
classification = "hung_test"
reasons.append("The test process exceeded its bounded execution time.")
elif tests["failures"] + tests["errors"] > 0:
classification = "test_failure"
reasons.append("JUnit reported a test failure or error.")
elif parse_errors:
classification = "infrastructure_failure"
reasons.append("One or more JUnit reports could not be parsed.")
elif step_outcome == "success" and tests["tests"] == 0:
classification = "missing_results"
reasons.append("The test step succeeded without reporting any tests.")
elif step_outcome in {"failure", "skipped", "unknown", ""} and tests["tests"] == 0:
classification = "setup_failure"
reasons.append("The test process did not produce a test result.")
elif step_outcome != "success" or exit_code not in {None, 0}:
classification = "infrastructure_failure"
reasons.append("Tests did not fail, but the surrounding test process failed.")
else:
classification = "passed"
reasons.append("The test process and every reported test passed.")

return {
"schemaVersion": 1,
"classification": classification,
"stepOutcome": step_outcome,
"exitCode": exit_code,
"tests": tests,
"failedTests": failed_tests,
"reportCount": len(report_files),
"reports": _file_manifest(report_files),
"reportParseErrors": parse_errors,
"diagnostics": _file_manifest(diagnostic_files),
"reasons": reasons,
}


def _expand_globs(patterns: list[str]) -> list[Path]:
return sorted(
{
Path(match)
for pattern in patterns
for match in glob.glob(pattern, recursive=True)
if Path(match).is_file()
},
key=str,
)


def _parse_exit_code(value: str) -> int | None:
return int(value) if value.strip() else None


def _source_sha() -> str:
try:
return subprocess.run(
["git", "rev-parse", "HEAD"],
check=True,
capture_output=True,
text=True,
).stdout.strip()
except (OSError, subprocess.CalledProcessError):
return os.environ.get("GITHUB_SHA", "")


def _summary(result: dict[str, object]) -> str:
tests = result["tests"]
context = result.get("context", {})
return "\n".join(
[
"### Test outcome classification",
"",
f"- Classification: `{result['classification']}`",
f"- Source SHA: `{context.get('sourceSha', '')}`",
f"- Profile/lane: `{context.get('profile', '')}` / `{context.get('lane', '')}`",
f"- Step outcome: `{result['stepOutcome']}`",
f"- Exit code: `{result['exitCode']}`",
f"- JUnit: {tests['tests']} tests, {tests['failures']} failures, "
f"{tests['errors']} errors, {tests['skipped']} skipped",
f"- Reports: {result['reportCount']}",
f"- Diagnostics: {len(result['diagnostics'])}",
f"- Reason: {result['reasons'][0]}",
"",
]
)


def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--step-outcome", required=True)
parser.add_argument("--exit-code", default="")
parser.add_argument("--report-glob", action="append", default=[])
parser.add_argument("--diagnostic-glob", action="append", default=[])
parser.add_argument("--output", required=True)
parser.add_argument("--summary")
args = parser.parse_args()

report_files = _expand_globs(args.report_glob)
diagnostic_files = _expand_globs(args.diagnostic_glob)
result = classify_outcome(
args.step_outcome,
_parse_exit_code(args.exit_code),
report_files,
diagnostic_files,
)
result["context"] = {
"sourceSha": _source_sha(),
"profile": os.environ.get("TEST_PROFILE", ""),
"lane": os.environ.get("TEST_LANE", ""),
"runId": os.environ.get("GITHUB_RUN_ID", ""),
"runAttempt": os.environ.get("GITHUB_RUN_ATTEMPT", ""),
}

output_path = Path(args.output)
output_path.parent.mkdir(parents=True, exist_ok=True)
output_path.write_text(
json.dumps(result, indent=2, sort_keys=True) + "\n", encoding="utf-8"
)

summary = _summary(result)
summary_path = args.summary or os.environ.get("GITHUB_STEP_SUMMARY")
if summary_path:
with Path(summary_path).open("a", encoding="utf-8") as summary_file:
summary_file.write(summary)
print(summary, end="")

return int(args.step_outcome == "success" and result["classification"] != "passed")


if __name__ == "__main__":
raise SystemExit(main())
50 changes: 50 additions & 0 deletions .github/scripts/configure_docker_storage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

set -euo pipefail

readonly docker_root="/mnt/docker"
readonly minimum_free_kb=$((32 * 1024 * 1024))

if [[ ! -d /mnt ]]; then
echo "::error::The runner does not provide /mnt"
exit 1
fi

if [[ "$(stat -c '%d' /)" == "$(stat -c '%d' /mnt)" ]]; then
available_kb="$(df --output=avail -k / | tail -n 1)"
if ((available_kb < minimum_free_kb)); then
echo "::error::The runner root has ${available_kb} KiB free; ${minimum_free_kb} KiB is required"
df -h / /mnt
exit 1
fi

echo "The runner uses one filesystem with ${available_kb} KiB free; keeping the existing Docker root"
docker info --format 'Docker root: {{.DockerRootDir}}'
df -h / /mnt
exit 0
fi

daemon_config="$(mktemp)"
trap 'rm -f "$daemon_config"' EXIT

if sudo test -s /etc/docker/daemon.json; then
sudo jq --arg root "$docker_root" '. + {"data-root": $root}' \
/etc/docker/daemon.json | tee "$daemon_config" > /dev/null
else
jq -n --arg root "$docker_root" '{"data-root": $root}' > "$daemon_config"
fi

sudo systemctl stop docker
sudo rm -rf "$docker_root"
sudo mkdir -p "$docker_root"
sudo install -m 0644 "$daemon_config" /etc/docker/daemon.json
sudo systemctl start docker

actual_root="$(docker info --format '{{.DockerRootDir}}')"
if [[ "$actual_root" != "$docker_root" ]]; then
echo "::error::Docker data root is $actual_root; expected $docker_root"
exit 1
fi

docker info --format 'Docker root: {{.DockerRootDir}}'
df -h / /mnt
Loading
Loading