ci: cut Molecule full-run time and CI run volume #419

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

Problem

Measured over 4.1 days of CI history (750 jobs):

  • Molecule takes 75% of the runner's time.
  • A full Molecule run takes about 85 min; system_baseline is the longest scenario at about 56 min.
  • About 31% of runner time ended in failed or cancelled jobs.
  • 49 "Merge branch 'main'" updates and Renovate rebase waves re-ran every workflow.
  • Image pin pull requests for tool bumps that only Lint uses force full Molecule runs.

Proposal

Shorter scenarios:

  • #420 test: run role refusal tests once, in verify.yml, not in every converge pass
  • #421 ci: shared molecule config: no prerun reinstall, smart fact gathering
  • #423 ci: turn on Ansible pipelining for Molecule scenarios (blocked by #421)
  • #424 feat(cloudflared): make the tunnel lookup retry delay an input
  • #425 feat(docker, system_baseline, tailscale): refresh the APT cache only when stale on install
  • #426 feat(traefik): release URL input, local stand-in releases for the update test, poll instead of a fixed pause
  • #427 test(tailscale): reuse downloaded packages across the scenario's reinstalls

Fewer runs:

  • #422 ci(renovate): group own image pins and ubuntu digests, weekly schedule, OSV alerts
  • #428 ci: narrow the Molecule selection for image pin and comment-only changes of molecule.yml
  • #429 docs: update only the next pull request to merge; never update a Renovate branch by hand
  • #430 docs(adr): a separate Molecule controller image
  • #431 ci: build and pin the Molecule controller image (blocked by #430)
  • #433 ci: skip the Molecule job when no scenario is selected

Scheduling, after the scenario changes land:

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

Problems found on the way:

  • #434 ci: an ansible-core or molecule pin bump selects no Molecule scenario
  • #435 images: molecule images bake packages the roles install, contrary to ADR 0002
  • systemd_hardening validates the drop-in shape in dropins.yml, after the disable and mask tasks have changed the host (against roles/AGENTS.md lines 62–65, "Validation order"): already covered by #137, not filed again.

Acceptance criteria

  • Every child issue is closed or explicitly dropped with a reason (checked on this issue's list).
  • A full Molecule run started by workflow_dispatch after the children land is measured and its time posted here, next to the 85 min baseline.

Assisted-by: Claude Code

### Problem Measured over 4.1 days of CI history (750 jobs): - Molecule takes 75% of the runner's time. - A full Molecule run takes about 85 min; `system_baseline` is the longest scenario at about 56 min. - About 31% of runner time ended in failed or cancelled jobs. - 49 "Merge branch 'main'" updates and Renovate rebase waves re-ran every workflow. - Image pin pull requests for tool bumps that only Lint uses force full Molecule runs. ### Proposal Shorter scenarios: - #420 test: run role refusal tests once, in verify.yml, not in every converge pass - #421 ci: shared molecule config: no prerun reinstall, smart fact gathering - #423 ci: turn on Ansible pipelining for Molecule scenarios (blocked by #421) - #424 feat(cloudflared): make the tunnel lookup retry delay an input - #425 feat(docker, system_baseline, tailscale): refresh the APT cache only when stale on install - #426 feat(traefik): release URL input, local stand-in releases for the update test, poll instead of a fixed pause - #427 test(tailscale): reuse downloaded packages across the scenario's reinstalls Fewer runs: - #422 ci(renovate): group own image pins and ubuntu digests, weekly schedule, OSV alerts - #428 ci: narrow the Molecule selection for image pin and comment-only changes of molecule.yml - #429 docs: update only the next pull request to merge; never update a Renovate branch by hand - #430 docs(adr): a separate Molecule controller image - #431 ci: build and pin the Molecule controller image (blocked by #430) - #433 ci: skip the Molecule job when no scenario is selected Scheduling, after the scenario changes land: - #432 ci: choose the Molecule lane count and start the longest scenarios first, by measurement Problems found on the way: - #434 ci: an ansible-core or molecule pin bump selects no Molecule scenario - #435 images: molecule images bake packages the roles install, contrary to ADR 0002 - `systemd_hardening` validates the drop-in shape in `dropins.yml`, after the disable and mask tasks have changed the host (against `roles/AGENTS.md` lines 62–65, "Validation order"): already covered by #137, not filed again. ### Acceptance criteria - [ ] Every child issue is closed or explicitly dropped with a reason (checked on this issue's list). - [ ] A full Molecule run started by `workflow_dispatch` after the children land is measured and its time posted here, next to the 85 min baseline. Assisted-by: Claude Code
Claude added the Kind/Enhancement
Status
Needs Triage
labels 2026-11-27 13:33:55 +00:00
Defame1297 added this to the CI velocity (emergency) milestone 2026-11-27 14:16:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#419