Docs trigger build job is not working
Due to a new configuration rule in HAProxy, the trigger-build-docs
script fails to communicate with the API, since we drop all requests that do not provide a User-Agent
header (failed job).
I found out this is an upstream bug in the gitlab
Ruby library that we use and reported it https://github.com/NARKOZ/gitlab/issues/338. I even found the culprit, but don't know how to properly fix this except hardcoding a value in the header options.
I tested locally and was monitoring log/api_json.log
. The following two requests were recorded, before and after I hardcoded the user agent. You can see "ua":a: null
and "ua": "Gem"
respectively:
{"time":"2017-11-17T08:36:31.035Z","severity":"INFO","duration":35.79,"db":3.34,"view":32.45,"status":200,"method":"GET","path":"/api/v4/projects/root%2Fdocs/repository/branches/master","params":{},"host":"localhost","ip":"::1","ua":null}
{"time":"2017-11-17T08:35:54.221Z","severity":"INFO","duration":20.28,"db":2.97,"view":17.310000000000002,"status":200,"method":"GET","path":"/api/v4/projects/root%2Fdocs/repository/branches/master","params":{},"host":"localhost","ip":"::1","ua":"Gem"}
@rymai you think you can help with this?
PS: A similar issue we encountered in www-gitlab-com
gitlab-com/www-gitlab-com#1768 (closed)