fix(ci-ephemeral): stop a still-running runner before reusing its VM after a cancelled job #194
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/runner-stop-before-reuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #192. A cancel only changes Forgejo's job status; the one-job runner keeps executing.
_reuse_vm_for_jobnow checksrunner_service_activefirst: if the runner is still alive it runssystemctl stop forgejo-runner-ephemeral.service(kills the unit's whole cgroup), confirms it is down, and only then deletes the registration and reuses the VM; if it cannot be stopped, the VM is destroyed instead. Four new tests in test_runner_cleanup.py (27 pass). Needs./infra deploy --tags ci_ephemeral_provisioner --limit servicesafter merge. Not included: whether the staging workflow's cleanup should also run on cancel (open in #192). Supersedes the empty #193.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ