Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
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-ce
Commits
d127cc74
Commit
d127cc74
authored
Oct 21, 2021
by
Patrick Steinhardt
Committed by
Stan Hu
Oct 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regressions in Gitaly
parent
584868af
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
15 deletions
+13
-15
.gitlab/ci/rails.gitlab-ci.yml
.gitlab/ci/rails.gitlab-ci.yml
+1
-0
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
lib/gitlab/setup_helper.rb
lib/gitlab/setup_helper.rb
+2
-5
lib/tasks/gitlab/gitaly.rake
lib/tasks/gitlab/gitaly.rake
+1
-1
spec/finders/branches_finder_spec.rb
spec/finders/branches_finder_spec.rb
+4
-4
spec/support/helpers/gitaly_setup.rb
spec/support/helpers/gitaly_setup.rb
+1
-1
spec/tasks/gitlab/gitaly_rake_spec.rb
spec/tasks/gitlab/gitaly_rake_spec.rb
+3
-3
No files found.
.gitlab/ci/rails.gitlab-ci.yml
View file @
d127cc74
...
...
@@ -181,6 +181,7 @@ setup-test-env:
paths
:
-
config/secrets.yml
-
tmp/tests/gitaly/_build/bin/
-
tmp/tests/gitaly/_build/deps/git/install
-
tmp/tests/gitaly/config.toml
-
tmp/tests/gitaly/gitaly2.config.toml
-
tmp/tests/gitaly/internal/
...
...
GITALY_SERVER_VERSION
View file @
d127cc74
4f0a07ba39f14adacf7d482128a5de2bb84f0ea
c
ee4b20cc318876c4b237e277fefd9d75186a085
c
lib/gitlab/setup_helper.rb
View file @
d127cc74
...
...
@@ -104,9 +104,6 @@ module Gitlab
socket_filename
=
options
[
:gitaly_socket
]
||
"gitaly.socket"
prometheus_listen_addr
=
options
[
:prometheus_listen_addr
]
git_bin_path
=
File
.
expand_path
(
'../gitaly/_build/deps/git/install/bin/git'
)
git_bin_path
=
nil
unless
File
.
exist?
(
git_bin_path
)
config
=
{
# Override the set gitaly_address since Praefect is in the loop
socket_path:
File
.
join
(
gitaly_dir
,
socket_filename
),
...
...
@@ -116,8 +113,8 @@ module Gitlab
# sidekiq jobs, and concurrency will be low anyway in test.
git:
{
catfile_cache_size:
5
,
bin_path:
git_bin_path
}
.
compact
,
bin_path:
File
.
expand_path
(
File
.
join
(
gitaly_dir
,
'_build'
,
'deps'
,
'git'
,
'install'
,
'bin'
,
'git'
))
},
prometheus_listen_addr:
prometheus_listen_addr
}.
compact
...
...
lib/tasks/gitlab/gitaly.rake
View file @
d127cc74
...
...
@@ -67,7 +67,7 @@ Usage: rake "gitlab:gitaly:install[/installation/dir,/storage/path]")
env
[
"BUNDLE_DEPLOYMENT"
]
=
'false'
end
Gitlab
::
Popen
.
popen
([
make_cmd
],
nil
,
env
)
Gitlab
::
Popen
.
popen
([
make_cmd
,
'all'
,
'git'
],
nil
,
env
)
end
end
end
...
...
spec/finders/branches_finder_spec.rb
View file @
d127cc74
...
...
@@ -208,10 +208,10 @@ RSpec.describe BranchesFinder do
context
'by page_token only'
do
let
(
:params
)
{
{
page_token:
'feature'
}
}
it
'r
eturns nothing
'
do
result
=
subject
e
xpect
(
result
.
count
).
to
eq
(
0
)
it
'r
aises an error
'
do
expect
do
subject
e
nd
.
to
raise_error
(
Gitlab
::
Git
::
CommandError
,
'13:could not find page token.'
)
end
end
...
...
spec/support/helpers/gitaly_setup.rb
View file @
d127cc74
...
...
@@ -98,7 +98,7 @@ module GitalySetup
end
def
build_gitaly
system
(
env
,
'make
'
,
chdir:
tmp_tests_gitaly_dir
)
# rubocop:disable GitlabSecurity/SystemCommandInjection
system
(
env
.
merge
({
'GIT_VERSION'
=>
nil
}),
'make all git
'
,
chdir:
tmp_tests_gitaly_dir
)
# rubocop:disable GitlabSecurity/SystemCommandInjection
end
def
start_gitaly
...
...
spec/tasks/gitlab/gitaly_rake_spec.rb
View file @
d127cc74
...
...
@@ -68,7 +68,7 @@ RSpec.describe 'gitlab:gitaly namespace rake task', :silence_stdout do
it
'calls gmake in the gitaly directory'
do
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
with
(
%w[which gmake]
).
and_return
([
'/usr/bin/gmake'
,
0
])
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
with
(
%w[gmake]
,
nil
,
{
"BUNDLE_GEMFILE"
=>
nil
,
"RUBYOPT"
=>
nil
}).
and_return
(
true
)
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
with
(
%w[gmake
all git
]
,
nil
,
{
"BUNDLE_GEMFILE"
=>
nil
,
"RUBYOPT"
=>
nil
}).
and_return
(
true
)
subject
end
...
...
@@ -81,13 +81,13 @@ RSpec.describe 'gitlab:gitaly namespace rake task', :silence_stdout do
end
it
'calls make in the gitaly directory'
do
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
with
(
%w[make]
,
nil
,
{
"BUNDLE_GEMFILE"
=>
nil
,
"RUBYOPT"
=>
nil
}).
and_return
(
true
)
expect
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
with
(
%w[make
all git
]
,
nil
,
{
"BUNDLE_GEMFILE"
=>
nil
,
"RUBYOPT"
=>
nil
}).
and_return
(
true
)
subject
end
context
'when Rails.env is test'
do
let
(
:command
)
{
%w[make]
}
let
(
:command
)
{
%w[make
all git
]
}
before
do
stub_rails_env
(
'test'
)
...
...
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