1. 12 Jan, 2017 1 commit
    • Kirill Smelkov's avatar
      There is no need to keep old hooks around - remove them · c6d7e3d3
      Kirill Smelkov authored
      [ Sent upstream: https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/40
      
        This was filed upstream but decided the better way to go is to
        configure default git templates to be just empty.
      
        Until we implement that, we continue to carry this patch as NXD ]
      
      gitlab-shell uses completely own whole set of git hooks and just
      symlinks repo.git/hooks to path/to/gitlab-shell/hooks/.
      
      Original hooks that git added there - when initializing repository -
      from its template, and which are by default deactivated, are currently
      moved to repos.git/hooks.old.<timestamp>, e.g.
      
      $ ls -F nexedi/helloweb.git/
          config
          description
          HEAD
          hooks@                  -->  ...path/to/gitlab-shell/hooks/
          hooks.old.1446564288/
          info/
          packed-refs
          refs/
      
      $ ls -F nexedi/helloweb.git/hooks.old.1446564288/
          applypatch-msg.sample*
          post-update.sample*
          pre-commit.sample*
          pre-push.sample*
          update.sample*
          commit-msg.sample*
          pre-applypatch.sample*
          prepare-commit-msg.sample*
          pre-rebase.sample*
      
      On the other hand, hooks.old.<timestamp> are not used anywhere and are
      left there "just in case". But what is the point to keep those pristine
      samples git creates by default? And we are sure those files are always
      results of gitlab-shell initializing a repository, as it is
      gitlab-shell's job to create/remove/update/etc repositories.
      
      So do not keep old hooks, remove them.
      
      P.S. The patch that introduced whole-hooks-dir-symlinking is
          db81327b (Symlink the whole hooks directory).
      
      /cc @dzaporozhets, @jacobvosmaer
      c6d7e3d3
  2. 23 May, 2016 1 commit
  3. 16 May, 2016 1 commit
    • Jacob Vosmaer (GitLab)'s avatar
      Merge branch 'use-redis-rb-client' into 'master' · 404d0b58
      Jacob Vosmaer (GitLab) authored
      Use Redis Ruby client instead of shelling out to redis-cli
      
      Previously the post-receive hook fired redis-cli, but if the argument list was too long the hook would silently fail. Instead of shelling out to redis-cli, we use a Ruby client to send the same message.
      
      Closes gitlab-org/gitlab-ce#17329
      
      
      See merge request !59
      404d0b58
  4. 12 May, 2016 6 commits
  5. 10 May, 2016 2 commits
  6. 09 May, 2016 1 commit
  7. 05 May, 2016 1 commit
  8. 28 Apr, 2016 3 commits
  9. 25 Apr, 2016 1 commit
  10. 20 Apr, 2016 2 commits
    • Stan Hu's avatar
      Merge branch 'aiionx/gitlab-shell-aiionx-post_receive_jid' into 'master' · c73b6a1c
      Stan Hu authored
      Update post receive worker so it logs a unique JID in sidekiq
      
      Taken from !50.
      
      Instead of
      
      ```
      2016-04-14T03:07:32.373Z 5285 TID-osycgmlyo PostReceive JID- INFO: start
      2016-04-14T03:07:32.374Z 5285 TID-osycgmlyo PostReceive JID- INFO: arguments: [...]
      2016-04-14T03:07:32.534Z 5285 TID-osycgmlyo PostReceive JID- INFO: done: 0.161 sec
      ```
      
      Have this log
      
      ```
      2016-04-14T03:07:32.373Z 5285 TID-osycgmlyo PostReceive JID-54b0b2f6616cae37e3e87f8a INFO: start
      2016-04-14T03:07:32.374Z 5285 TID-osycgmlyo PostReceive JID-54b0b2f6616cae37e3e87f8a INFO: arguments: [...]
      2016-04-14T03:07:32.534Z 5285 TID-osycgmlyo PostReceive JID-54b0b2f6616cae37e3e87f8a INFO: done: 0.161 sec
      ```
      
      
      This way sidekiq can Log a unique JID in the sidekiq.log for PostReceive.
      So when parsing the logs (with logstash for example) you know it belongs to that unique job.
      
      This puts the logs in a uniform manner like the other workers that are pushed to redis (which do have a JID)
      For example the ProjectWebHookWorker
      
      ```
      2016-04-14T03:13:07.917Z 5285 TID-osycsh7z0 ProjectWebHookWorker JID-800085fb3cf7241fdeecc6ec INFO: start
      2016-04-14T03:13:07.918Z 5285 TID-osycsh7z0 ProjectWebHookWorker JID-800085fb3cf7241fdeecc6ec INFO: arguments: [...]
      2016-04-14T03:13:12.500Z 5285 TID-osycsh7z0 ProjectWebHookWorker JID-800085fb3cf7241fdeecc6ec INFO: done: 4.583 sec
      ```
      
      
      See merge request !55
      c73b6a1c
    • aiionx's avatar
      750fd3f8
  11. 19 Apr, 2016 2 commits
  12. 18 Apr, 2016 3 commits
  13. 16 Apr, 2016 1 commit
  14. 07 Apr, 2016 1 commit
  15. 06 Apr, 2016 2 commits
  16. 31 Mar, 2016 6 commits
  17. 29 Mar, 2016 2 commits
  18. 24 Mar, 2016 4 commits