NoMethodError (undefined method 'reverse_merge' for nil:NilClass)

Summary

When using an external CI and it reports a build has failed, GitLab 8.16.5-ee produces the error 'NoMethodError (undefined method 'reverse_merge' for nil:NilClass) and returns HTTP 500 Internal Server Error.

Steps to reproduce

  1. Using an external CI (we are using TeamCity Professional 10.0.4), build a branch that fails.

What is the current bug behavior?

  1. GitLab production.log shows the error described above and below.
  2. GitLab continuously shows build status as "running".
  3. GitLab returns HTTP 500 Internal Server Error to the external CI.

What is the expected correct behavior?

  1. GitLab shows build status as "failed".

Relevant logs

Started POST "/api/v3/projects/group%2Fproject/statuses/29392bbebf020f4f0dad14546292ef8edc4a13be" for xxx.xxx.xxx.xxx at 2017-02-21 12:47:08 -0600

NoMethodError (undefined method `reverse_merge' for nil:NilClass):
  lib/api/api.rb:23:in `block in <class:API>'
  lib/gitlab/middleware/multipart.rb:93:in `call'
  lib/gitlab/request_profiler/middleware.rb:15:in `call'
  lib/gitlab/middleware/go.rb:16:in `call'
  lib/gitlab/middleware/readonly_geo.rb:29:in `call'
Assignee Loading
Time tracking Loading