Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to remove runners #33750

Open
honx opened this issue Feb 28, 2025 · 2 comments
Open

API to remove runners #33750

honx opened this issue Feb 28, 2025 · 2 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@honx
Copy link

honx commented Feb 28, 2025

Feature Description

I'm running a gitea installation with a lot of "ephemeral" act_runners. These register, do work for a short amount of time and then get deleted. It seems there is currently no way to programmatically remove runners from repos/orgs and it has to be done by hand in the web ui.

The following functions would be really useful for me:
a) a way to retrieve runner info (esp. Status and "Last online Time") via the REST API
b) a way to delete runners via the REST API
c) a way for a runner to deregister itself via the grpc API (not a replacement for a) since the runner cannot be trusted to deregister itself)

I had look through the Rest API, grpc api and there currently (1.24 dev) doesnt seem to be a way to do this. I also didnt find any issues for gitea or act_runner that already discuss this.

Screenshots

No response

@honx honx added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Feb 28, 2025
@ChristopherHX
Copy link
Contributor

I came around an ephemeral runner management application that actually used the runners rest api of GitHub Actions just this week. Mounting this into Gitea Rest would be great, otherwise the runner list cleanup logic fails.

Those apis I would suggest are based on GitHubs like

A marker for myself

func RunnerDeletePost(ctx *context.Context) {

I wanted to have c) as fallback of missing server support for ephemeral WIP, but now it's to late for my usecase as no ephemeral support most likely implies no self remove.

@ChristopherHX
Copy link
Contributor

ChristopherHX commented Mar 2, 2025

For what it worth here a draft of an organization + repository level implementation of 1) and 2) ChristopherHX@fe4f407 + ChristopherHX@624fde6 (to fix the labels getter)

This area is currently in flux, while my other changes are pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants