ci(molecule): stop running every scenario for files no scenario reads #299

Merged
Defame1297 merged 2 commits from ci/narrow-molecule-ignore into main 2026-11-22 20:50:48 +00:00
Owner

What and why

Closes #

A pull request ran every Molecule scenario whenever it changed scripts/select_molecule_scenarios.py, and that happened every time a new file was added to its IGNORED list. The Molecule workflow runs the base branch's copy of the selector, so no scenario ever runs the pull request's copy: running everything tested nothing about the change.

IGNORED now also lists:

  • scripts/select_molecule_scenarios.py: its unit tests cover it, and the push run after the merge runs every scenario;
  • */AGENTS.md: the nested agent guidance, which replaces the roles/AGENTS.md entry;
  • roles/*/README.md: a role's documentation, which used to select that role and its users;
  • .python-version and scripts/lock-requirements.sh: Molecule uses the runner's own venv.

galaxy.yml, meta/runtime.yml, requirements.yml, .gitea/workflows/molecule.yml and extensions/molecule/* still run every scenario.

No changelog fragment: CI only, nothing a consumer sees.

Verified

  • python3 -m unittest discover -s tests/scripts: 228 tests pass, including new cases for the newly ignored paths.
  • The commit-stage pre-commit hooks pass; ansible-test sanity ran on push.

Not verified

  • This pull request is still judged by main's copy of the selector, so it runs every scenario itself. The narrower selection takes effect on the next pull request after the merge.

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

Assisted-by: Claude Code:claude-opus-5-5

## What and why Closes # A pull request ran every Molecule scenario whenever it changed `scripts/select_molecule_scenarios.py`, and that happened every time a new file was added to its `IGNORED` list. The Molecule workflow runs the base branch's copy of the selector, so no scenario ever runs the pull request's copy: running everything tested nothing about the change. `IGNORED` now also lists: - `scripts/select_molecule_scenarios.py`: its unit tests cover it, and the push run after the merge runs every scenario; - `*/AGENTS.md`: the nested agent guidance, which replaces the `roles/AGENTS.md` entry; - `roles/*/README.md`: a role's documentation, which used to select that role and its users; - `.python-version` and `scripts/lock-requirements.sh`: Molecule uses the runner's own venv. `galaxy.yml`, `meta/runtime.yml`, `requirements.yml`, `.gitea/workflows/molecule.yml` and `extensions/molecule/*` still run every scenario. No changelog fragment: CI only, nothing a consumer sees. ## Verified - `python3 -m unittest discover -s tests/scripts`: 228 tests pass, including new cases for the newly ignored paths. - The commit-stage pre-commit hooks pass; `ansible-test sanity` ran on push. ## Not verified - This pull request is still judged by `main`'s copy of the selector, so it runs every scenario itself. The narrower selection takes effect on the next pull request after the merge. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code:claude-opus-5-5
Claude added 1 commit 2026-11-22 20:11:36 +00:00
ci(molecule): stop running every scenario for files no scenario reads
Build / build (pull_request) Canceled after 0s
Lint / lint (pull_request) Canceled after 0s
Molecule / molecule (pull_request) Canceled after 0s
00bac19705
A pull request ran every scenario when it changed the selector itself,
which happened whenever a new file was added to its IGNORED list.
Molecule runs the base branch's copy, so the pull request's copy is
never exercised by a scenario. Ignore it, nested AGENTS.md files, role
READMEs, .python-version and scripts/lock-requirements.sh.

Assisted-by: Claude Code:claude-opus-5-5
CODEOWNERS rules requested review from Defame1297 2026-11-22 20:11:36 +00:00
Defame1297 added 1 commit 2026-11-22 20:13:01 +00:00
Merge branch 'main' into ci/narrow-molecule-ignore
Build / build (pull_request) Successful in 24s
Lint / lint (pull_request) Successful in 1m27s
Molecule / molecule (pull_request) Successful in 18m18s
5f2003e07f
Defame1297 approved these changes 2026-11-22 20:13:18 +00:00
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-22 20:13:21 +00:00
Defame1297 merged commit b49c953e8d into main 2026-11-22 20:50:48 +00:00
Defame1297 deleted branch ci/narrow-molecule-ignore 2026-11-22 20:50:49 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#299