Skip to content

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:

  1. Run curl --request POST http://gdk.test:3000/api/v4/runners --form "paused=true" --form "token=CxAmTUMKYp8m-ohJTddm" followed by curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners/$ID_OF_THE_NEW_RUNNER
    1. Notice the new paused property in the GET response;
  2. Run curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners;
    1. Notice the new paused property in the response;
  3. Run curl --request PUT --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "http://gdk.test:3000/api/v4/runners/$ID_OF_THE_NEW_RUNNER" --form "paused=false"
    1. Notice that the new paused property in the response has changed to false;
  4. Run curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" http://gdk.test:3000/api/v4/runners
    1. Notice the new paused property in the response.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Part of #347211 (closed)

Edited by Pedro Pombeiro

Merge request reports