ci(molecule): decide whether a galaxy.yml change that touches only version or build_ignore runs every scenario #352

Closed
opened 2026-11-24 12:31:01 +00:00 by Claude · 1 comment
Owner

Problem

From 2 to 24 Nov, galaxy.yml caused 22 of 67 full-selection pull request Molecule runs (226 of 703 min), second only to .gitea/workflows/molecule.yml (measured in #338). Most of those changes are release version bumps and build_ignore additions.

galaxy.yml cannot go on IGNORED in scripts/select_molecule_scenarios.py: Molecule reads it when it installs the collection under test, and build_ignore decides which files that install carries. Narrowing it needs a rule that looks at what changed in the file, which changes what Molecule proves before a merge (#256).

Proposal

Decide, maintainer, between:

  • keeping the full selection for any galaxy.yml change;
  • a selector rule: a galaxy.yml diff that touches only version selects nothing, and one that touches build_ignore selects nothing when no listed pattern matches a file under roles/ or meta/;
  • skipping Molecule on the generated release pull request (#175), relying on the nightly full run.

Before deciding, confirm in a CI run whether Molecule's installed copy or the checkout on ANSIBLE_COLLECTIONS_PATH is the one a scenario loads.

Acceptance criteria

  • The decision is recorded as a comment here, and in .gitea/workflows/AGENTS.md if it changes a rule.
  • If a selector rule is chosen, an implementation issue is filed as Status/Ready for Agent.

Part of the CI velocity work; see #338.

Assisted-by: Claude Code

### Problem From 2 to 24 Nov, `galaxy.yml` caused 22 of 67 full-selection pull request Molecule runs (226 of 703 min), second only to `.gitea/workflows/molecule.yml` (measured in #338). Most of those changes are release `version` bumps and `build_ignore` additions. `galaxy.yml` cannot go on `IGNORED` in `scripts/select_molecule_scenarios.py`: Molecule reads it when it installs the collection under test, and `build_ignore` decides which files that install carries. Narrowing it needs a rule that looks at what changed in the file, which changes what Molecule proves before a merge (#256). ### Proposal Decide, maintainer, between: - keeping the full selection for any `galaxy.yml` change; - a selector rule: a `galaxy.yml` diff that touches only `version` selects nothing, and one that touches `build_ignore` selects nothing when no listed pattern matches a file under `roles/` or `meta/`; - skipping Molecule on the generated release pull request (#175), relying on the nightly full run. Before deciding, confirm in a CI run whether Molecule's installed copy or the checkout on `ANSIBLE_COLLECTIONS_PATH` is the one a scenario loads. ### Acceptance criteria - [ ] The decision is recorded as a comment here, and in `.gitea/workflows/AGENTS.md` if it changes a rule. - [ ] If a selector rule is chosen, an implementation issue is filed as `Status/Ready for Agent`. Part of the CI velocity work; see #338. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-24 12:31:01 +00:00
Claude added the
Status
Ready for Human
label 2026-11-24 12:31:01 +00:00
Author
Owner

Decision: put galaxy.yml on IGNORED in scripts/select_molecule_scenarios.py, after one CI run confirms scenarios load the checkout, and add a guard that fails the Molecule run if that stops being true. Implemented in #355.

Why: in the pinned molecule and ansible-compat (26.11.0), molecule builds Runtime(isolated=False); its prerun installs the collection under test into ansible-compat's cache directory, which is not put on ANSIBLE_COLLECTIONS_PATH. scripts/run_molecule_in_ci_image.sh puts $AC_ROOT (the checkout) first on that path. So version, build_ignore and the other galaxy.yml keys do not change what a scenario runs, and whether the collection builds is already proven on every pull request by the Build check, with the nightly full run as backstop. This is from reading the source, not a run, so #355 confirms it first and holds it with a guard.

Rejected: keeping the full selection (about a third of full pull request runs, #338, for no proof a scenario uses); a diff-based selector rule (a stdlib-only galaxy.yml parser on the host, guarding an effect that does not occur); skipping Molecule on the release pull request (saves only version bumps, depends on #175).

Fallback: if the confirmation shows molecule's installed copy is what loads, #355 stops and this ticket reopens for the diff-based rule.

Assisted-by: Claude Code

**Decision:** put `galaxy.yml` on `IGNORED` in `scripts/select_molecule_scenarios.py`, after one CI run confirms scenarios load the checkout, and add a guard that fails the Molecule run if that stops being true. Implemented in #355. **Why:** in the pinned molecule and ansible-compat (26.11.0), molecule builds `Runtime(isolated=False)`; its prerun installs the collection under test into ansible-compat's cache directory, which is not put on `ANSIBLE_COLLECTIONS_PATH`. `scripts/run_molecule_in_ci_image.sh` puts `$AC_ROOT` (the checkout) first on that path. So `version`, `build_ignore` and the other `galaxy.yml` keys do not change what a scenario runs, and whether the collection builds is already proven on every pull request by the Build check, with the nightly full run as backstop. This is from reading the source, not a run, so #355 confirms it first and holds it with a guard. **Rejected:** keeping the full selection (about a third of full pull request runs, #338, for no proof a scenario uses); a diff-based selector rule (a stdlib-only `galaxy.yml` parser on the host, guarding an effect that does not occur); skipping Molecule on the release pull request (saves only version bumps, depends on #175). **Fallback:** if the confirmation shows molecule's installed copy is what loads, #355 stops and this ticket reopens for the diff-based rule. Assisted-by: Claude Code
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#352