Forgejo allows to register Forgejo Runners dynamically. I use that functionality to create single-use runners on-demand in response to pending jobs that I obtain by polling /orgs/{org}/actions/runners/jobs and /orgs/{org}/actions/runners/jobs. Those runners have unique names to prevent conflicts. Forgejo offers no API to remove those runners. But I can enable the cron job Cleanup Offline Runners that removes them automatically after a configurable amount of time.
On Codeberg, I can do the same. But the stale runners pile up because Cleanup Offline Runners is not enabled.
It would be great if Codeberg could remove those stale runners automatically as well.
Simply enabling Cleanup Offline Runners might be problematic for some people. For example, I would not want my persistent runner to be removed just because it happens to be offline. Therefore, having some mechanism to opt-in on an {organization,user,repository} basis would be great. Furthermore, it would be nice if there was a possibility to mark a runner as "dynamic" which would prevent persistent runners from being removed even if automatic removal of offline runners were enabled. I'd welcome that functionality in Forgejo as well.
Alternatively, having an API for runner removal would work as well.
### Comment
Forgejo allows to register Forgejo Runners dynamically. I use that functionality to create single-use runners on-demand in response to pending jobs that I obtain by polling `/orgs/{org}/actions/runners/jobs` and `/orgs/{org}/actions/runners/jobs`. Those runners have unique names to prevent conflicts. Forgejo offers no API to remove those runners. But I can enable the cron job [Cleanup Offline Runners](https://forgejo.org/docs/latest/admin/config-cheat-sheet/#cron---cleanup-offline-runners-croncleanup_offline_runners) that removes them automatically after a configurable amount of time.
On Codeberg, I can do the same. But the stale runners pile up because Cleanup Offline Runners is not enabled.
It would be great if Codeberg could remove those stale runners automatically as well.
Simply enabling Cleanup Offline Runners might be problematic for some people. For example, I would not want my persistent runner to be removed just because it happens to be offline. Therefore, having some mechanism to opt-in on an {organization,user,repository} basis would be great. Furthermore, it would be nice if there was a possibility to mark a runner as "dynamic" which would prevent persistent runners from being removed even if automatic removal of offline runners were enabled. I'd welcome that functionality in Forgejo as well.
Alternatively, having an API for runner removal would work as well.