Skip to content

Wrong method call on notify_post_receive.

Created by: lleoni

GitLab upgrade to 9.0 or 9.1 cause an error on notify_post_receive invocation. Every push gives the following error :

application.log stack trace

Started POST "/api/v4/internal/notify_post_receive" for 127.0.0.1 at 2017-04-27 07:52:39 +0200

NoMethodError (undefined method 'render_api_error' for #<#<Class:0x007fce2edf76f0>:0x007fce1d030758>
Did you mean?  render_api_error!
               render_spam_error!):
/opt/gitlab/embedded/service/gitlab-rails/lib/api/internal.rb:143:in  'rescue in block (2 levels) in <class:Internal>'

File lib/api/internal.rb contains wrong method call

 begin
     Gitlab::GitalyClient::Notifications.new(project.repository).post_receive
       rescue GRPC::Unavailable => e
         render_api_error(e, 500)
 end

instead of

  begin
      Gitlab::GitalyClient::Notifications.new(project.repository).post_receive
        rescue GRPC::Unavailable => e
          render_api_error!(e, 500)
  end

Merge request reports

Loading