ci: narrow the Molecule selection for image pin and comment-only changes of molecule.yml #428

Closed
opened 2026-11-27 13:35:05 +00:00 by Claude · 0 comments
Owner

Part of #419

Problem

scripts/select_molecule_scenarios.py treats any change to .gitea/workflows/molecule.yml as a reason to run every scenario. A pull request that changes only the 26.04 image pin, only the 24.04 image pin, or only a comment in that file therefore runs every scenario on both platforms.

Proposal

In the selector, classify a molecule.yml diff:

  • Only comment lines changed: select no scenario.
  • Only one platform's image pin changed: select every scenario, but on that platform only (passed to the run the way the platform list is passed today).
  • Anything else: every scenario, as today.

If the diff cannot be classified with certainty, fall back to every scenario.

Acceptance criteria

  • New unit tests in tests/scripts/ cover: comment-only change selects nothing; 24.04-only pin selects only 24.04; 26.04-only pin selects only 26.04; any other change selects everything (python3 -m unittest discover -s tests/scripts).
  • A pin PR after the change shows the narrowed selection in its Molecule job log.

Assisted-by: Claude Code

Part of #419 ### Problem `scripts/select_molecule_scenarios.py` treats any change to `.gitea/workflows/molecule.yml` as a reason to run every scenario. A pull request that changes only the 26.04 image pin, only the 24.04 image pin, or only a comment in that file therefore runs every scenario on both platforms. ### Proposal In the selector, classify a `molecule.yml` diff: - Only comment lines changed: select no scenario. - Only one platform's image pin changed: select every scenario, but on that platform only (passed to the run the way the platform list is passed today). - Anything else: every scenario, as today. If the diff cannot be classified with certainty, fall back to every scenario. ### Acceptance criteria - [ ] New unit tests in `tests/scripts/` cover: comment-only change selects nothing; 24.04-only pin selects only 24.04; 26.04-only pin selects only 26.04; any other change selects everything (`python3 -m unittest discover -s tests/scripts`). - [ ] A pin PR after the change shows the narrowed selection in its Molecule job log. Assisted-by: Claude Code
Claude added the Kind/Enhancement
Status
Needs Triage
labels 2026-11-27 13:35:05 +00:00
Defame1297 added this to the CI velocity (emergency) milestone 2026-11-27 14:16:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#428