From 0379db9236ac51a45217db1179df9ef5be8472a2 Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Tue, 10 Feb 2026 14:21:51 +0100 Subject: [PATCH 1/2] openqa-bats-review: Fix update of expected dict We were updating the expected dict when iterating on the job list. We should do this once and it's safe to do so because get_job() is cached. --- openqa-bats-review | 33 +++++++++++++++++--------------- tests/test_openqa_bats_review.py | 2 -- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/openqa-bats-review b/openqa-bats-review index eade0f43..69a4ea04 100755 --- a/openqa-bats-review +++ b/openqa-bats-review @@ -194,6 +194,22 @@ def main(url: str, dry_run: bool = False) -> None: "umoci_testsuite": 2, } + job_id = chain[0] + job = get_job(f"{openqa_host}/api/v1/jobs/{job_id}/details") + # We have more tests on Tumbleweed + if job["settings"]["DISTRI"] == "opensuse": + # For buildah we also run conformance tests + expected["buildah_testsuite"] += 1 + # For conmon we also test crun as root & rootless + expected["conmon_testsuite"] += 2 + # For containerd we also run the critest + expected["containerd_testsuite"] += 1 + expected["docker_testsuite"] += 6 + # For skopeo we also run Golang integration tests + expected["skopeo_testsuite"] += 1 + elif job["settings"]["DISTRI"] == "sle" and job["settings"]["VERSION"].startswith("16."): + expected["docker_testsuite"] += 6 + all_failures = [] for job_id in chain: @@ -216,22 +232,9 @@ def main(url: str, dry_run: bool = False) -> None: if testsuite.endswith("_crun"): testsuite = testsuite[: -len("_crun")] - # We have more tests on Tumbleweed - if job["settings"]["DISTRI"] == "opensuse": - # For buildah we also run conformance tests - expected["buildah_testsuite"] += 1 - # For conmon we also test crun as root & rootless - expected["conmon_testsuite"] += 2 - # For containerd we also run the critest - expected["containerd_testsuite"] += 1 - expected["docker_testsuite"] += 6 - # For skopeo we also run Golang integration tests - expected["skopeo_testsuite"] += 1 - elif job["settings"]["DISTRI"] == "sle" and job["settings"]["VERSION"].startswith("16."): - expected["docker_testsuite"] += 6 - if len(logs) != expected[testsuite]: - log.info("Job %s has only %d logs, skipping", job_id, len(logs)) + log.info("Job %s has only %d logs (expected: %d for %s), skipping", + job_id, len(logs), expected[testsuite], testsuite) continue failed = process_logs(logs) diff --git a/tests/test_openqa_bats_review.py b/tests/test_openqa_bats_review.py index e2e03748..314a3d4a 100644 --- a/tests/test_openqa_bats_review.py +++ b/tests/test_openqa_bats_review.py @@ -245,8 +245,6 @@ def job_resp(url: str) -> dict[str, Any]: with pytest.raises(SystemExit) as exc: bats_review.main("http://openqa.example.com/tests/123", dry_run=True) assert exc.value.code == 0 - mock_log.info.assert_any_call("Job %s has only %d logs, skipping", 123, 2) - mock_log.info.assert_any_call("Job %s has only %d logs, skipping", 122, 2) mock_log.info.assert_any_call("No logs found in chain. Exiting") From ea104232510466f1a98da3da4f344a3124d80480 Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Tue, 10 Feb 2026 16:49:32 +0100 Subject: [PATCH 2/2] openqa-bats-review: Update podman_e2e value --- openqa-bats-review | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openqa-bats-review b/openqa-bats-review index 69a4ea04..b5e95ade 100755 --- a/openqa-bats-review +++ b/openqa-bats-review @@ -186,7 +186,7 @@ def main(url: str, dry_run: bool = False) -> None: "docker_rootless_testsuite": 12, "docker_testsuite": 13, "netavark_testsuite": 1, - "podman_e2e": 4, + "podman_e2e": 3, "podman_rootless_e2e": 3, "podman_testsuite": 4, "runc_testsuite": 2, @@ -205,6 +205,9 @@ def main(url: str, dry_run: bool = False) -> None: # For containerd we also run the critest expected["containerd_testsuite"] += 1 expected["docker_testsuite"] += 6 + # We also run the remoteintegration test for crun, skip it for runc + if job["settings"].get("OCI_RUNTIME") == "crun": + expected["podman_e2e"] += 1 # For skopeo we also run Golang integration tests expected["skopeo_testsuite"] += 1 elif job["settings"]["DISTRI"] == "sle" and job["settings"]["VERSION"].startswith("16."):