feat(traefik): skip a fresh apt refresh and trim the scenario's repeated work #470

Open
Claude wants to merge 1 commits from perf/458-traefik-scenario into main
pull from: perf/458-traefik-scenario
Owner

What and why

Closes #458

  • Role: tasks/binary/prereqs.yml refreshes the APT cache only when it is older than an hour (cache_valid_time: 3600), as docker, system_baseline and user_management already do. It installs distribution packages only and runs before anything else in the install path; the role adds no APT source. The README notes that a consumer who adds a source just before the role must refresh the cache first. minor_changes fragment.
  • Verify exercises the update path once, to the other release, instead of there and back. The "other release differs" assert stays. The _binary_update scenario covers repeated swaps.
  • Prepare builds only the other release's stand-in archive. The default version's stand-in was used only by the trip back; converge, the check passes and idempotence download the real release.
  • Prepare runs mortis.kamino.ufw with the scenario's group_vars, so converge runs only traefik, with gather_facts: false. The ufw scenario covers that role's own check and idempotence. The first check pass now starts with ufw active, which is closer to a real host.
  • README and molecule.yml comments describe the new layout.

Verified

  • pre-commit run --all-files passes, and ansible-test sanity passed on push.

  • A clean-context review checked:

    • the stand-in selection: only update_and_check.yml uses a file:// release;
    • the remaining stand-in's archive and checksum names;
    • that the group_vars reach the prepare ufw play;
    • that no task, template or handler in traefik, ufw or _binary_update reads a fact.

    It found nothing blocking.

Not verified

  • The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #458 - **Role:** `tasks/binary/prereqs.yml` refreshes the APT cache only when it is older than an hour (`cache_valid_time: 3600`), as `docker`, `system_baseline` and `user_management` already do. It installs distribution packages only and runs before anything else in the install path; the role adds no APT source. The README notes that a consumer who adds a source just before the role must refresh the cache first. `minor_changes` fragment. - **Verify** exercises the update path once, to the other release, instead of there and back. The "other release differs" assert stays. The `_binary_update` scenario covers repeated swaps. - **Prepare** builds only the other release's stand-in archive. The default version's stand-in was used only by the trip back; converge, the check passes and idempotence download the real release. - **Prepare** runs `mortis.kamino.ufw` with the scenario's group_vars, so converge runs only `traefik`, with `gather_facts: false`. The `ufw` scenario covers that role's own check and idempotence. The first check pass now starts with ufw active, which is closer to a real host. - README and `molecule.yml` comments describe the new layout. ## Verified - `pre-commit run --all-files` passes, and `ansible-test sanity` passed on push. - A clean-context review checked: - the stand-in selection: only `update_and_check.yml` uses a `file://` release; - the remaining stand-in's archive and checksum names; - that the group_vars reach the prepare ufw play; - that no task, template or handler in `traefik`, `ufw` or `_binary_update` reads a fact. It found nothing blocking. ## Not verified - The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-28 21:56:13 +00:00
Claude added 1 commit 2026-11-28 21:56:13 +00:00
feat(traefik): skip a fresh apt refresh and trim the scenario's repeated work
Build / build (pull_request) Successful in 1m16s
Lint / lint (pull_request) Successful in 5m47s
Molecule / molecule (pull_request) Successful in 8m58s
7bc3cc6bdf
The prerequisites install takes only distribution packages and runs
before any source is added, yet refreshed the APT cache on every run.
It now passes cache_valid_time: 3600, as docker, system_baseline and
user_management already do; the README tells a consumer who adds a
source just before the role to refresh the cache themselves.

The default scenario repeated work other steps already cover. Verify
now exercises the update path once, to the other release, so prepare
builds only that stand-in; the role default's stand-in was used only
by the way back. mortis.kamino.ufw moves to prepare, as the ufw
scenario tests it, so converge and idempotence run only traefik, with
fact gathering off since none of the roles reads facts.

Closes #458

Assisted-by: Claude Code
Author
Owner

Measured: the Molecule job passed, and traefik/default ran in 523 s, sharing the runner with #469's run for part of it. Task rounds in the scenario went from 689 to 525 (−24%), against the log of run 6363 on main before this change. For reference, the scenario took 1027 s in a 4-lane full run and 484 s in a 2-lane one, so the seconds here do not show a saving; the task count is the load-independent measure.

Assisted-by: Claude Code

Measured: the Molecule job passed, and `traefik/default` ran in 523 s, sharing the runner with #469's run for part of it. Task rounds in the scenario went from 689 to 525 (−24%), against the log of run 6363 on `main` before this change. For reference, the scenario took 1027 s in a 4-lane full run and 484 s in a 2-lane one, so the seconds here do not show a saving; the task count is the load-independent measure. Assisted-by: Claude Code
All checks were successful
Build / build (pull_request) Successful in 1m16s
Required
Details
Lint / lint (pull_request) Successful in 5m47s
Required
Details
Molecule / molecule (pull_request) Successful in 8m58s
Required
Details
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin perf/458-traefik-scenario:perf/458-traefik-scenario
git checkout perf/458-traefik-scenario
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#470