• Robert Speicher's avatar
    Merge branch 'fix-nil-user-update-mirror-service' into 'master' · 9bdd60c5
    Robert Speicher authored
    Fix nil user handling in UpdateMirrorService
    
    Previously an exception was hit quite frequently:
    
    ```
    NoMethodError: undefined method `can?' for nil:NilClass
      app/services/projects/update_mirror_service.rb:9:in `execute'
        unless current_user.can?(:push_code_to_protected_branches, project)
      lib/gitlab/metrics/instrumentation.rb:153:in `execute'
        retval   = super
      app/workers/repository_update_mirror_worker.rb:13:in `perform'
        result = Projects::UpdateMirrorService.new(@project, @current_user).execute
      lib/gitlab/sidekiq_middleware/memory_killer.rb:17:in `call'
        yield
      lib/gitlab/sidekiq_middleware/arguments_logger.rb:6:in `call'
        yield
    ...
    (26 additional frame(s) were not displayed)
    ```
    
    Closes #605
    
    See merge request !434
    9bdd60c5
To find the state of this project's repository at the time of any of these versions, check out the tags.
CHANGELOG-EE 19.2 KB