scripts/run_molecule_scenarios.sh prints each scenario's log group only after every lane has finished. When one scenario hangs, its lane holds until the Molecule job's timeout-minutes. The runner then cancels the step, and no group is printed, so the log shows neither where the hung scenario stopped nor why any other scenario failed.
Run 6604 is an example. traefik/default was still running after 89 minutes when the job timed out, and system_baseline/default had failed with exit 2. The job log has only the finished <label>: exit N after S s lines. A rerun of the same commit passed in 30 minutes.
Printing the logs from the script's signal trap is unlikely to help: the runner seems to stop capturing the step's output once it cancels it.
Out of scope: why that run hung.
Proposal
Run each molecule test under coreutils timeout, with a per-scenario limit well below the job's timeout. The limit defaults to 30 min against about 8.5 min for the longest scenario today, and MOLECULE_SCENARIO_TIMEOUT (seconds) overrides it.
A hung scenario then fails on its own with exit 124. Its containers are removed as for any other failure, and its partial log prints in its group while the job is still alive. The lane is freed, so the rest of the run finishes and reports.
Acceptance criteria
A test in tests/scripts/test_run_molecule_scenarios.py shows that a scenario running past the limit is stopped and reported as failed, that its partial log is printed, and that the other scenarios still run and report.
A test holds the default limit below the Molecule job's timeout-minutes.
### Problem
`scripts/run_molecule_scenarios.sh` prints each scenario's log group only after every lane has finished. When one scenario hangs, its lane holds until the Molecule job's `timeout-minutes`. The runner then cancels the step, and no group is printed, so the log shows neither where the hung scenario stopped nor why any other scenario failed.
Run 6604 is an example. `traefik/default` was still running after 89 minutes when the job timed out, and `system_baseline/default` had failed with exit 2. The job log has only the `finished <label>: exit N after S s` lines. A rerun of the same commit passed in 30 minutes.
Printing the logs from the script's signal trap is unlikely to help: the runner seems to stop capturing the step's output once it cancels it.
Out of scope: why that run hung.
### Proposal
Run each `molecule test` under coreutils `timeout`, with a per-scenario limit well below the job's timeout. The limit defaults to 30 min against about 8.5 min for the longest scenario today, and `MOLECULE_SCENARIO_TIMEOUT` (seconds) overrides it.
A hung scenario then fails on its own with exit 124. Its containers are removed as for any other failure, and its partial log prints in its group while the job is still alive. The lane is freed, so the rest of the run finishes and reports.
### Acceptance criteria
- [ ] A test in `tests/scripts/test_run_molecule_scenarios.py` shows that a scenario running past the limit is stopped and reported as failed, that its partial log is printed, and that the other scenarios still run and report.
- [ ] A test holds the default limit below the Molecule job's `timeout-minutes`.
- [ ] `python3 -m unittest discover -s tests/scripts` passes.
- [ ] `pre-commit run --all-files` passes.
- [ ] The full Molecule run in CI passes.
Assisted-by: Claude Code
Claude
added this to the CI velocity (emergency) milestone 2026-11-29 11:25:58 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
scripts/run_molecule_scenarios.shprints each scenario's log group only after every lane has finished. When one scenario hangs, its lane holds until the Molecule job'stimeout-minutes. The runner then cancels the step, and no group is printed, so the log shows neither where the hung scenario stopped nor why any other scenario failed.Run 6604 is an example.
traefik/defaultwas still running after 89 minutes when the job timed out, andsystem_baseline/defaulthad failed with exit 2. The job log has only thefinished <label>: exit N after S slines. A rerun of the same commit passed in 30 minutes.Printing the logs from the script's signal trap is unlikely to help: the runner seems to stop capturing the step's output once it cancels it.
Out of scope: why that run hung.
Proposal
Run each
molecule testunder coreutilstimeout, with a per-scenario limit well below the job's timeout. The limit defaults to 30 min against about 8.5 min for the longest scenario today, andMOLECULE_SCENARIO_TIMEOUT(seconds) overrides it.A hung scenario then fails on its own with exit 124. Its containers are removed as for any other failure, and its partial log prints in its group while the job is still alive. The lane is freed, so the rest of the run finishes and reports.
Acceptance criteria
tests/scripts/test_run_molecule_scenarios.pyshows that a scenario running past the limit is stopped and reported as failed, that its partial log is printed, and that the other scenarios still run and report.timeout-minutes.python3 -m unittest discover -s tests/scriptspasses.pre-commit run --all-filespasses.Assisted-by: Claude Code