ci(molecule): isolate Molecule runs per run and stop running Molecule on push to main #350

Merged
Defame1297 merged 5 commits from ci/molecule-per-run-isolation into main 2026-11-24 10:22:22 +00:00
5 Commits
Author SHA1 Message Date
Defame1297 1885b3fe99 ci(molecule): check container removal by listing what is left
Build / build (pull_request) Successful in 14s
Lint / lint (pull_request) Successful in 1m1s
Molecule / molecule (pull_request) Successful in 14m54s
A removal that fails because another run's sweep was first is harmless,
but checking that with `docker container inspect` also passed when the
daemon could not be reached. Both removal steps now remove what they
can and then list the containers they meant to remove; a failing list
or a container still listed fails the step.

The workflow rules name the test that holds the sweep's age bound to
the job timeout.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 10:00:30 +00:00
Defame1297 3726b5c53f test(scripts): treat a process that exits mid-read as gone
Reading /proc/<pid>/stat raises ProcessLookupError when the process
exits between the open and the read, which made the lane-kill tests
fail now and then.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:52:43 +00:00
Defame1297 4f0b8e0cfe ci(molecule): hold the sweep bound to the job timeout and tolerate races
A script test now fails when the sweep step's age bound differs from the
job's timeout-minutes, since a shorter bound would remove a live run's
containers. The final cleanup removes this run's containers one by one
and fails only when one is still there, as another run's sweep may have
removed it first once this run passed its timeout.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:50:34 +00:00
Defame1297 6c2e05c95a ci(molecule): harden the stale-container sweep and correct comments
The sweep now fails the step when a timestamp cannot be parsed or a
container it removes is still there, while tolerating one another run's
sweep removed first. Its 30-minute bound and the job's timeout point at
each other, since a shorter bound would remove a live run's containers.

The concurrency comments of Lint and Build now say that runs on one ref
queue rather than cancel, and the scenarios' comment names the run
script as what removes their containers. The workflow test checks the
label filters of the sweep and cleanup steps by name.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:42:03 +00:00
Defame1297 96cb9246c6 ci(molecule): isolate runs per run and drop the push trigger on main
Two Molecule runs could not overlap on one Docker daemon because every
scenario's container name was fixed; only the runner's single slot kept
them apart. Each platform is now named and labelled by KAMINO_RUN_ID
(run id and attempt, "local" outside CI), the run script expands those
names with molecule's own interpolator before removing them, and the
workflow removes its own containers by label and only sweeps labelled
leftovers older than the job timeout, so a run still going is never hit.
Non-pull-request runs get a concurrency group of their own.

Push to main no longer triggers Molecule, Lint or Build: a merged pull
request was already tested, and the nightly and manual Molecule runs
cover every scenario. Build keeps its v* tag trigger.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-24 09:35:03 +00:00