diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/docs_gates/smoke.py | 10 | ||||
| -rw-r--r-- | scripts/docs_gates/test_smoke.py | 4 |
2 files changed, 8 insertions, 6 deletions
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" |
