From 95b8a4115439826e7dff767bf3515684535d0783 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Wed, 22 Jul 2026 18:30:57 +0300 Subject: docs-gates: widen smoke retry envelope for worker-version propagation (5 rounds x 30s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The merge-triggered smoke run for the round-based retry work failed on a worker-version propagation race that outlasted the 3-round x 20s envelope: all probes were served the previous SHA through rounds 1-2 and one path (cli.html) was still stale at round 3 (2 sleeps x 20s = 40s insufficient). Widen to MAX_ROUNDS=5 / RETRY_SLEEP_SECONDS=30 -> 4 inter-round sleeps x 30s = 2 min, covering the observed 1-2+ min propagation waves. The green path is unaffected (no retries -> zero added time); DEADLINE_SECONDS=480 still bounds the worst case. Tests read the constants dynamically (monkeypatch), so none pin the old literals. 🤖 Generated by [robots](https://vyos.io) --- scripts/docs_gates/smoke.py | 10 ++++++---- scripts/docs_gates/test_smoke.py | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/docs_gates/smoke.py b/scripts/docs_gates/smoke.py index 874eb5cf..34dc87d7 100644 --- a/scripts/docs_gates/smoke.py +++ b/scripts/docs_gates/smoke.py @@ -31,10 +31,12 @@ USER_AGENT = "vyos-docs-smoke/1.0 (+https://github.com/vyos/vyos-documentation)" # can lose a propagation race: for a few minutes a probe may be served by the PREVIOUS version # (wrong status / stale X-Docs-Build). Rather than fail-fast, each round re-probes ONLY the # still-failing probes — this preserves the full per-probe failure enumeration (diagnostic -# value) while adding at most (MAX_ROUNDS - 1) inter-round sleeps. DEADLINE_SECONDS caps total -# wall-clock so a pile-up of slow / timing-out probes cannot run unbounded. -MAX_ROUNDS = 3 -RETRY_SLEEP_SECONDS = 20 +# value) while adding at most (MAX_ROUNDS - 1) inter-round sleeps. Envelope widened to 5 rounds +# x 30s after an observed propagation wave outlasted 3 rounds x 20s (a path still stale at +# round 3): 4 x 30s = 2 min now covers the observed 1-2+ min waves. The green path still costs +# zero extra time (no retries), and DEADLINE_SECONDS=480 still bounds the worst case. +MAX_ROUNDS = 5 +RETRY_SLEEP_SECONDS = 30 DEADLINE_SECONDS = 480 diff --git a/scripts/docs_gates/test_smoke.py b/scripts/docs_gates/test_smoke.py index d32ec0cb..f0a37c7a 100644 --- a/scripts/docs_gates/test_smoke.py +++ b/scripts/docs_gates/test_smoke.py @@ -292,7 +292,7 @@ def test_httperror_response_is_closed_even_when_read_raises(monkeypatch): urllib.error.HTTPError("https://host.invalid/x", 502, "msg", Message(), body)])) probe = smoke.Probe("/en/rolling/index.html", 200, assert_docs_build=False, assert_apex_build=False) - ok, status, docs_build, detail = smoke._probe_once("host", probe, "sha", "id", "sec") + ok, _, _, detail = smoke._probe_once("host", probe, "sha", "id", "sec") assert ok is False assert detail is not None and "reset during body read" in detail assert body.close_calls >= 1 # close still attempted despite the read raising @@ -328,6 +328,6 @@ def test_probe_once_detail_joins_multiple_failed_checks(monkeypatch): # wrong status AND missing X-Apex-Build → detail "status+apex-build" monkeypatch.setattr(smoke, "_OPENER", _FakeOpener([_FakeResp(500, {})])) probe = smoke.Probe("/versions.json", 200, assert_docs_build=False, assert_apex_build=True) - ok, status, docs_build, detail = smoke._probe_once("host", probe, "sha", "id", "sec") + ok, _, _, detail = smoke._probe_once("host", probe, "sha", "id", "sec") assert ok is False assert detail == "status+apex-build" -- cgit v1.2.3