ci(molecule): open an issue when the nightly full run fails and close it on the next green one #270
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: Mortis/Kamino#270
Reference in new issue
Block a user
Spec: What Molecule proves before a merge, and who acts on the nightly run, resolution point 2.
Why
A failed nightly Molecule run tells nobody today. A scheduled run's trigger user is the system account
gitea-actions, which Gitea never mails, and a scheduled run sets no commit status (read in the Gitea v28.3.0 source:services/actions/notifier_helper.gohandleSchedules,models/user/user.goIsMailable,services/actions/commit_status.go). The nightly is the only run of the scenarios a pull request's diff did not select.What
In
.gitea/workflows/molecule.yml, for a full run only (eventscheduleorworkflow_dispatch, onmain):Nightly Molecule run failedexists, comment the run's URL on it; otherwise open it with labelStatus/Needs Triage.curland the job token. Grantpermissions: issues: writeon that job only; everything else keepscontents: read. Pass every value throughenv:, never${{ }}in arun:block.A pull-request run never touches the issue.
Acceptance
workflow_dispatchrun onmainopens the issue; a second failing run comments on it; a green run closes it.build_ignore).Not verified
Whether
issues: readalone would let the job token open an issue (the route only checks repo read on issues; inferred from source, not tested). Ask forissues: write.The owner rule ("the maintainer owns a red nightly; any trusted contributor may fix it") is written into
maintaining.mdby #262, not here.Scope added by #359, the pull request for #262:
docs/contributing/maintaining.mdholds the rule "The maintainer owns triage of a failed full Molecule run; any trusted contributor may fix it." as Held by: aspirational, because this issue's control does not exist yet.The pull request that closes this issue changes that rule's held-by line in the Releases section of
maintaining.mdto: Held by: control: the run opens or updates the issueNightly Molecule run failedand closes it when green. The line names no issue number.