From 40d5c49e333afe325f2c22cd69b9d478528fad43 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 28 Nov 2026 23:23:45 +0000 Subject: [PATCH 1/3] ci(molecule): run two scenarios at a time by default A full run on main took 34 minutes with 2 lanes and 35 with 4: with 4 every scenario ran about twice as slowly, so the runner is full at two, and two leave it room for pull request jobs. The duration list now holds the 2-lane run's times and adds nfs_client. Closes #432 Assisted-by: Claude Code --- .gitea/workflows/AGENTS.md | 2 +- scripts/run_molecule_scenarios.sh | 44 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/AGENTS.md b/.gitea/workflows/AGENTS.md index de5ac42..769d2c4 100644 --- a/.gitea/workflows/AGENTS.md +++ b/.gitea/workflows/AGENTS.md @@ -110,7 +110,7 @@ issue. concurrency group of its own.** Runs may overlap on the runner's Docker daemon: every container is named and labelled by its run (`KAMINO_RUN_ID`). The job first removes labelled containers 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, 4 unless a manual + 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 diff --git a/scripts/run_molecule_scenarios.sh b/scripts/run_molecule_scenarios.sh index 3a1a33e..720cff3 100755 --- a/scripts/run_molecule_scenarios.sh +++ b/scripts/run_molecule_scenarios.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on -# stdin, MOLECULE_LANES (default 4, also when empty) at a time, longest first, each with its own +# stdin, MOLECULE_LANES (default 2, also when empty) at a time, longest first, each with its own # log and ANSIBLE_HOME under // (no collection is installed there: # .config/molecule/config.yml sets prerun false). # Exit 1 on a failure. @@ -8,7 +8,8 @@ # scripts/run_molecule_scenarios.sh < scenario-dirs set -euo pipefail -lanes="${MOLECULE_LANES:-4}" +# 2: the runner is full at two; a full run took as long with 4 lanes, each scenario twice as slow. +lanes="${MOLECULE_LANES:-2}" if ! [[ "$lanes" =~ ^[1-9][0-9]*$ ]]; then echo "MOLECULE_LANES must be a positive integer, not '$lanes'" >&2 exit 2 @@ -83,25 +84,26 @@ mkdir -p "$work" # `finished