Commit 03e66710 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'gitaly-transistion-helpers' into 'master'

Gitaly hook transistion changes

See merge request gitlab-org/gitlab-shell!268
parents d3a853ec 482e981d
...@@ -25,7 +25,7 @@ Git hooks that allow GitLab to validate Git pushes (e.g. "is this user ...@@ -25,7 +25,7 @@ Git hooks that allow GitLab to validate Git pushes (e.g. "is this user
allowed to push to this protected branch"). These hooks also trigger allowed to push to this protected branch"). These hooks also trigger
events in GitLab (e.g. to start a CI pipeline after a push). In events in GitLab (e.g. to start a CI pipeline after a push). In
GitLab's current architecture (Q4 2018) these hooks belong to Gitaly GitLab's current architecture (Q4 2018) these hooks belong to Gitaly
more than gitlab-shell. We [intend to move them to the Gitaly more than gitlab-shell. We [are moving them to the Gitaly
repository](https://gitlab.com/gitlab-org/gitaly/issues/1226). repository](https://gitlab.com/gitlab-org/gitaly/issues/1226).
## Code status ## Code status
......
ROOT_PATH = File.expand_path('..', __dir__) ROOT_PATH = ENV.fetch('GITLAB_SHELL_DIR', File.expand_path('..', __dir__))
# We are transitioning parts of gitlab-shell into the gitaly project. In
# gitaly, GITALY_EMBEDDED will be true.
GITALY_EMBEDDED = false
require_relative 'gitlab_config' require_relative 'gitlab_config'
...@@ -78,7 +78,8 @@ module HTTPHelper ...@@ -78,7 +78,8 @@ module HTTPHelper
$logger.warn('Failed to connect', method: method.to_s.upcase, url: url, error: e) $logger.warn('Failed to connect', method: method.to_s.upcase, url: url, error: e)
raise GitlabNet::ApiUnreachableError raise GitlabNet::ApiUnreachableError
ensure ensure
$logger.info('finished HTTP request', method: method.to_s.upcase, url: url, duration: Time.new - start_time) fields = { method: method.to_s.upcase, url: url, duration: Time.new - start_time, gitaly_embedded: GITALY_EMBEDDED }
$logger.info('finished HTTP request', fields)
end end
case response case response
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment