Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
482e981d
Commit
482e981d
authored
Dec 20, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitaly hook transistion changes
parent
d3a853ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
README.md
README.md
+1
-1
lib/gitlab_init.rb
lib/gitlab_init.rb
+5
-1
lib/http_helper.rb
lib/http_helper.rb
+2
-1
No files found.
README.md
View file @
482e981d
...
...
@@ -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
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
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
)
.
## Code status
...
...
lib/gitlab_init.rb
View file @
482e981d
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'
lib/http_helper.rb
View file @
482e981d
...
...
@@ -78,7 +78,8 @@ module HTTPHelper
$logger
.
warn
(
'Failed to connect'
,
method:
method
.
to_s
.
upcase
,
url:
url
,
error:
e
)
raise
GitlabNet
::
ApiUnreachableError
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
case
response
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment