Runner API maximum_timeout inconsistency
Summary
The GitLab Runner property maximum_timeout
(server side) can neither be unset (set to null) nor updated without updating any other runner attribute
Steps to reproduce
Send the following request to a GitLab server:
BODY (Forms): maximum_timeout = 6000
curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/runners/6" --form "maximum_timeout=6000"
What is the current bug behavior?
The API returns:
{"error":"description, active, tag_list, run_untagged, locked, access_level are missing, at least one parameter must be provided"}
If also --form "active=true"
is passed to curl, that request succeeds and is also updating the maximum_timeout value.
What is the expected correct behavior?
The api should support updating and clearing the maximum_timeout value without updating any other value.
Possible fixes
- add
maximum_timeout
to https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/runners.rb#L61 - But I don't know how to allow setting it to null
Edited by Klaus Frank