ci(molecule): skip the Molecule runner when no scenario is selected #503
Open
Claude
wants to merge 3 commits from
ci/433-skip-empty-molecule into main
pull from: ci/433-skip-empty-molecule
merge into: Mortis:main
Mortis:main
Mortis:renovate/lint-tooling
Mortis:renovate/own-ci-images
Mortis:renovate/pip-compile-refresh
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Needs Triage
Maintainer needs to evaluate this issue
Status
Ready for Agent
Fully specified, ready for an AFK agent
Status
Ready for Human
Requires human implementation
Wayfinder
Grilling
Decision ticket resolved in conversation with the maintainer
Wayfinder
Map
Wayfinder map: index of a planning effort and its decision tickets
Wayfinder
Prototype
Decision ticket resolved by reacting to a rough concrete artifact
Wayfinder
Research
Decision ticket resolved by reading outside sources
Wayfinder
Task
Manual work that must happen before a decision can be made
No labels
Milestone
No items
No Milestone
CI velocity (emergency)
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mortis/Kamino#503
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Closes #433
molecule.ymlis split into three jobs, so a pull request that selects no scenario no longer occupies a Molecule runner slot:kamino-dockerin the molecule-controller pin. It runs main's copy of the selector and outputs the list, ornonewhen nothing is selected.kamino-moleculeonly when the list is neithernonenor empty. It does everything the old job did: the daemon check, checkout, sweep,docker run, cleanup, and the 90-minute timeout equal to the sweep age.Molecule / Result): runs withif: always(). It fails unless select succeeded and scenarios either succeeded, or was skipped because select output exactlynone. A lost or empty output therefore fails it rather than passing green.Other changes:
0.1.1, the image with git that #488 added. It now appears in three places, because actionlint forbidsenvincontainer.image, and a test keeps the copies equal..gitea/workflows/AGENTS.mdanddocs/contributing/maintaining.mddescribe the jobs and the new required check.Maintainer step
After this pull request's trial run passes, swap the branch-protection required check on
mainfromMolecule / molecule (pull_request)toMolecule / Result (pull_request). Do it before or at the merge. Once this merges, the old check is never reported again, so every pull request would wait on it.Verified
python3 -m unittest discover -s tests/scripts). The tests cover:if: always()on result;sh;pre-commit run --all-filespasses, including actionlint and zizmor.scripts/check_image_versions.py pinspasses.94af071e….e403987: select → scenarios (every scenario) → Result all succeeded. It proves on Gitea that select's job output reaches scenarios, that select's clone needs nosafe.directory, and that the check is namedMolecule / Result (pull_request).nonemarker, the sh test, the literal guard test) or listed below.Not verified
The trial changed
molecule.yml, so it selected every scenario: the non-empty path is proven, the empty-selection path is not. Still to prove on Gitea:The empty-selection path: that Gitea and act_runner pass the multi-line job output, evaluate
needs.select.outputs.scenariosin a jobif:, and setneeds.*.resulttoskipped/success/failure. A docs-only pull request after the merge exercises this path.Whether a skipped scenarios job still waits for a free
kamino-moleculerunner. That depends on whether the runner, not the server, evaluates the jobif:. If it does, a pull request that selects nothing waits behind a busy Molecule runner, although it never runs on it.Renovate on a future controller bump. Renovate was not run locally. Statically, the regex manager moves
CONTROLLER_IMAGE, the github-actions manager moves the twocontainer.imagecopies, and the "own CI images" group puts all of them in one pull request.New timeouts: 10 minutes for select and 5 for result.
Files I added carry SPDX headers, or are covered by
REUSE.toml(REUSE-clean); no third-party NOTICE is needed.Assisted-by: Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.