From c95b5aa77166b8cda291cb6567113f9d06c2bf9a Mon Sep 17 00:00:00 2001 From: ScottW514 Date: Wed, 23 Sep 2026 17:50:48 -0400 Subject: [PATCH] update.job-locks: ask the releases API when nothing was checked The test took the release to download from GET /update/release, the kept answer of the daily check. That answer does not outlive a restart of forgectrl, and a campaign restarts it many times after update.release-check has run, so on the bench reference (image 20260923084705) the test found "not checked yet" and failed with "no release is published to download". When the kept answer was never checked, the test now asks POST /update/check itself, the way update.release-check does. PASS on the bench in the unattended queue (the check asked, 200; the download of v0.0.6 held the lease and ended; no archive left behind); forgetest's unit tests 452 OK. --- forgetest/forgetest/suite/updlock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forgetest/forgetest/suite/updlock.py b/forgetest/forgetest/suite/updlock.py index d75586a..e4bb9cb 100644 --- a/forgetest/forgetest/suite/updlock.py +++ b/forgetest/forgetest/suite/updlock.py @@ -35,6 +35,10 @@ def job_locks(ctx): ev = ctx.evidence ctx.check(fc.wait_idle(timeout=30, abort=ctx.aborted), "machine not idle") st, rel = fc.get("/update/release") + if st == 200 and isinstance(rel, dict) and not rel.get("checked"): + # the kept answer does not outlive a restart of the daemon: ask now + st, rel = fc.post("/update/check") + ctx.log("the release was not checked since the daemon started: POST /update/check -> %s", st) ev["release"] = {k: (rel or {}).get(k) for k in ("available", "version", "bytes")} if isinstance(rel, dict) else rel ctx.check(st == 200 and isinstance(rel, dict) and rel.get("available"), "no release is published to download: %s", rel) had = os.path.exists(DL_FW)