ci: choose the Molecule lane count and start the longest scenarios first, by measurement #432

Open
opened 2026-11-27 13:35:44 +00:00 by Claude · 0 comments
Owner

Part of #419

Problem

The number of parallel Molecule lanes and the order scenarios start in were not chosen by measurement. With system_baseline far longer than the rest, a long scenario started late sets the end of the whole run. MOLECULE_LANES is not passed into the run container, so it cannot be varied per run.

Do this after #420, #421, #423, #422, #424, #425, #426 and #427 land, because they change the scenario durations.

Proposal

  • Pass MOLECULE_LANES into the run container (molecule.yml and scripts/run_molecule_in_ci_image.sh), with a workflow_dispatch input.
  • Start scenarios longest first, using a duration list kept in the repository or the previous run's timings.
  • Compare full runs started by workflow_dispatch with 2 and with 4 lanes, and keep the faster setting that does not cause timeouts or flaky failures.

Acceptance criteria

  • MOLECULE_LANES reaches run_molecule_scenarios.sh (unit test in tests/scripts/; python3 -m unittest discover -s tests/scripts).
  • Scenarios start longest first (unit test of the ordering).
  • The PR lists the wall-clock time and result of at least one full run each with 2 and 4 lanes, and the chosen default.

Assisted-by: Claude Code

Part of #419 ### Problem The number of parallel Molecule lanes and the order scenarios start in were not chosen by measurement. With `system_baseline` far longer than the rest, a long scenario started late sets the end of the whole run. `MOLECULE_LANES` is not passed into the run container, so it cannot be varied per run. Do this after #420, #421, #423, #422, #424, #425, #426 and #427 land, because they change the scenario durations. ### Proposal - Pass `MOLECULE_LANES` into the run container (`molecule.yml` and `scripts/run_molecule_in_ci_image.sh`), with a `workflow_dispatch` input. - Start scenarios longest first, using a duration list kept in the repository or the previous run's timings. - Compare full runs started by `workflow_dispatch` with 2 and with 4 lanes, and keep the faster setting that does not cause timeouts or flaky failures. ### Acceptance criteria - [ ] `MOLECULE_LANES` reaches `run_molecule_scenarios.sh` (unit test in `tests/scripts/`; `python3 -m unittest discover -s tests/scripts`). - [ ] Scenarios start longest first (unit test of the ordering). - [ ] The PR lists the wall-clock time and result of at least one full run each with 2 and 4 lanes, and the chosen default. Assisted-by: Claude Code
Claude added the Kind/Enhancement
Status
Needs Triage
labels 2026-11-27 13:35:44 +00:00
Defame1297 added this to the CI velocity (emergency) milestone 2026-11-27 14:16:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#432