projects/id/runners/id should always allow deletion
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Currently the API to disassociate a runner from a project fails if it is the only project the runner is attached to. This is inconsistent and complicates the api handling.
Also runners/id/projects/id would sound more logical to me (also because the current one is documented with all other runners/ instead of project/ apis)
And requests therefore would look like:
curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/{{ runnerID }}/projects/{{ urlencoded_project_name_with_namespace }}"curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/{{ runnerID }}/projects/{{ projectID }}"
Proposal
Automatically delete the runner if it is disassociated from the last project.
What does success look like, and how can we measure that?
Simplify calling the api and simplify logic callers need to implement themselves.
Links / references
Edited by 🤖 GitLab Bot 🤖