Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2017-03-16 05:31:09 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-03-20 11:40:36 +0300
commite79ab1115bf6ab4776678a379f7d507455d867c0 (patch)
tree0a7aedc5ddd8b14351be5cbf213582e841ed95b3 /lib/api/helpers
parentbbf4d27a5c046f95b6fda109dcda109fd00298b1 (diff)
Remove legacy Runners support in /api/v4/jobs/request
In Runner v1.3.0 we've started to send User-Agent header with Runner's version data. Since GitLab v8.12.0 we've started to use this header to check if used Runner's version supports 204 status code instead of 404 as a response when there is no jobs to execute by a Runner. In APIv4 (introduced in GitLab 9.0.0) will require Runner v9.0.0. And writing more accurately: GitLab Runner v9.0.0 will require GitLab at least 9.0.0. Because of such breaking change we are able to switch entirely to 204 response code and there is no need to do check of User-Agent. This commit removes useless code and complexity.
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/runner.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb
index ec2bcaed929..74848a6e144 100644
--- a/lib/api/helpers/runner.rb
+++ b/lib/api/helpers/runner.rb
@@ -41,14 +41,6 @@ module API
(Time.now - current_runner.contacted_at) >= contacted_at_max_age
end
- def job_not_found!
- if headers['User-Agent'].to_s =~ /gitlab(-ci-multi)?-runner \d+\.\d+\.\d+(~beta\.\d+\.g[0-9a-f]+)? /
- no_content!
- else
- not_found!
- end
- end
-
def validate_job!(job)
not_found! unless job