Can we remove the direct dependency of gitlab-shell hooks on Redis?
Gitlab-shell integrates with Redis in two ways, both of them in the push hooks:
- directly enqueueing Sidekiq PostReceive jobs
- reference counter to wait for active pushes to finish when trying to migrate the repository to another storage
This seems needlessly complex. I am wondering if we can get rid of the Redis dependency and do everything with HTTP calls to the internal API instead.
I was involved as a reviewer in making the second Redis interaction (counters); I don't remember exactly why we chose to go to Redis directly but I am not sure it is needed.
The first Redis interaction (enqueueing Sidekiq jobs) goes way back to gitlab-shell 1.0, 4 years ago.
@dzaporozhets do you remember if there was a special reason to enqueue to Redis directly, instead of going via a HTTP API call (with Rails enqueuing the job)?