ci(molecule): stop a scenario that runs past its own time limit

A hung scenario held its lane until the job's 90-minute timeout, and the
cancel then lost every scenario's log, since the groups print only after
the final wait. Each molecule test now runs under coreutils timeout with
MOLECULE_SCENARIO_TIMEOUT seconds (default 1800), so the hang fails by
itself, its log says it timed out, and the other lanes finish.

timeout runs with --foreground so it and molecule stay in the script's
process group: without it timeout leads a group of its own, which a
cancel that kills the step's group no longer reaches (the killed-group
test fails). On expiry molecule alone is signalled; anything it leaves
ends with the run container (docker run --init).

Closes #474

Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-11-29 11:42:09 +00:00
1 parent e8f739904a
commit 41820fd9a7
3 files changed
+60 -7

No files matched your search

+2 -2
View File
@@ -112,8 +112,8 @@ issue.
older than its timeout, which a cancelled run left, and finally its own. The scenarios of one
run overlap (`scripts/run_molecule_scenarios.sh`, `MOLECULE_LANES` at a time, 2 unless a manual
dispatch sets its `lanes` input), so no two scenarios may share a platform name. They start
longest first by the script's list of last full-run times, an unlisted one first; the logs stay
in selection order. *Why:* a cancelled run is killed before it can remove its instances, a
longest first by the script's list of last full-run times, an unlisted one first; one still
running after 30 min fails on its own; the logs stay in selection order. *Why:* a cancelled run is killed before it can remove its instances, a
younger container may belong to a run still going, and a long scenario started late sets the
end of the run. *Held:* review; control: the start order by
`test_the_longest_scenarios_start_first` and the input by `LanesInputTest`, both in