REST API: Deprecate 'active' property for Runners
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR deprecates the active
property in the Runner
entity returned by various REST endpoints, and the endpoints that accept it (to create/update the model). active
is to be replaced by paused
in %15.0.
The Runner CLI will be adapted accordingly in %15.0 so that we don't break things when a new runner is talking to an older GitLab instance.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
Endpoint | Screenshot |
---|---|
GET /runners |
|
PUT /runners/:id |
|
POST /runners |
|
GET /runners/:id |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Assuming you already have some runners registered in the local GDK and a personal token exported in GITLAB_TOKEN
:
- Run
curl --request POST http://gdk.test:3000/api/v4/runners --form "paused=true" --form "token=CxAmTUMKYp8m-ohJTddm"
followed bycurl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners/$ID_OF_THE_NEW_RUNNER
- Notice the new
paused
property in theGET
response;
- Notice the new
- Run
curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners
;- Notice the new
paused
property in the response;
- Notice the new
- Run
curl --request PUT --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "http://gdk.test:3000/api/v4/runners/$ID_OF_THE_NEW_RUNNER" --form "paused=false"
- Notice that the new
paused
property in the response has changed tofalse
;
- Notice that the new
- Run
curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners
- Notice the new
paused
property in the response.
- Notice the new
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Part of #347211 (closed)