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
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
Jérome Perrin
gitlab-ce
Commits
06afa5a3
Commit
06afa5a3
authored
Mar 28, 2018
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'workhorse-gitaly-mandatory' into 'master'"
This reverts merge request !18002
parent
ef92eb6b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
changelogs/unreleased/workhorse-gitaly-mandatory.yml
changelogs/unreleased/workhorse-gitaly-mandatory.yml
+0
-5
lib/gitlab/workhorse.rb
lib/gitlab/workhorse.rb
+4
-4
spec/lib/gitlab/workhorse_spec.rb
spec/lib/gitlab/workhorse_spec.rb
+4
-4
No files found.
changelogs/unreleased/workhorse-gitaly-mandatory.yml
deleted
100644 → 0
View file @
ef92eb6b
---
title
:
Make all workhorse gitaly calls opt-out
merge_request
:
18002
author
:
type
:
other
lib/gitlab/workhorse.rb
View file @
06afa5a3
...
@@ -42,7 +42,7 @@ module Gitlab
...
@@ -42,7 +42,7 @@ module Gitlab
end
end
def
send_git_blob
(
repository
,
blob
)
def
send_git_blob
(
repository
,
blob
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_raw_show
,
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_raw_show
)
{
{
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GetBlobRequest'
=>
{
'GetBlobRequest'
=>
{
...
@@ -70,7 +70,7 @@ module Gitlab
...
@@ -70,7 +70,7 @@ module Gitlab
params
=
repository
.
archive_metadata
(
ref
,
Gitlab
.
config
.
gitlab
.
repository_downloads_path
,
format
)
params
=
repository
.
archive_metadata
(
ref
,
Gitlab
.
config
.
gitlab
.
repository_downloads_path
,
format
)
raise
"Repository or ref not found"
if
params
.
empty?
raise
"Repository or ref not found"
if
params
.
empty?
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_archive
,
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_archive
)
params
.
merge!
(
params
.
merge!
(
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GitalyRepository'
=>
repository
.
gitaly_repository
.
to_h
'GitalyRepository'
=>
repository
.
gitaly_repository
.
to_h
...
@@ -87,7 +87,7 @@ module Gitlab
...
@@ -87,7 +87,7 @@ module Gitlab
end
end
def
send_git_diff
(
repository
,
diff_refs
)
def
send_git_diff
(
repository
,
diff_refs
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_send_git_diff
,
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_send_git_diff
)
{
{
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'RawDiffRequest'
=>
Gitaly
::
RawDiffRequest
.
new
(
'RawDiffRequest'
=>
Gitaly
::
RawDiffRequest
.
new
(
...
@@ -105,7 +105,7 @@ module Gitlab
...
@@ -105,7 +105,7 @@ module Gitlab
end
end
def
send_git_patch
(
repository
,
diff_refs
)
def
send_git_patch
(
repository
,
diff_refs
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_send_git_patch
,
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
params
=
if
Gitlab
::
GitalyClient
.
feature_enabled?
(
:workhorse_send_git_patch
)
{
{
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'GitalyServer'
=>
gitaly_server_hash
(
repository
),
'RawPatchRequest'
=>
Gitaly
::
RawPatchRequest
.
new
(
'RawPatchRequest'
=>
Gitaly
::
RawPatchRequest
.
new
(
...
...
spec/lib/gitlab/workhorse_spec.rb
View file @
06afa5a3
...
@@ -55,7 +55,7 @@ describe Gitlab::Workhorse do
...
@@ -55,7 +55,7 @@ describe Gitlab::Workhorse do
end
end
end
end
context
'when Gitaly workhorse_archive feature is disabled'
,
:
disable_gitaly
do
context
'when Gitaly workhorse_archive feature is disabled'
,
:
skip_gitaly_mock
do
it
'sets the header correctly'
do
it
'sets the header correctly'
do
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
...
@@ -100,7 +100,7 @@ describe Gitlab::Workhorse do
...
@@ -100,7 +100,7 @@ describe Gitlab::Workhorse do
end
end
end
end
context
'when Gitaly workhorse_send_git_patch feature is disabled'
,
:
disable_gitaly
do
context
'when Gitaly workhorse_send_git_patch feature is disabled'
,
:
skip_gitaly_mock
do
it
'sets the header correctly'
do
it
'sets the header correctly'
do
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
...
@@ -173,7 +173,7 @@ describe Gitlab::Workhorse do
...
@@ -173,7 +173,7 @@ describe Gitlab::Workhorse do
end
end
end
end
context
'when Gitaly workhorse_send_git_diff feature is disabled'
,
:
disable_gitaly
do
context
'when Gitaly workhorse_send_git_diff feature is disabled'
,
:
skip_gitaly_mock
do
it
'sets the header correctly'
do
it
'sets the header correctly'
do
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
...
@@ -452,7 +452,7 @@ describe Gitlab::Workhorse do
...
@@ -452,7 +452,7 @@ describe Gitlab::Workhorse do
end
end
end
end
context
'when Gitaly workhorse_raw_show feature is disabled'
,
:
disable_gitaly
do
context
'when Gitaly workhorse_raw_show feature is disabled'
,
:
skip_gitaly_mock
do
it
'sets the header correctly'
do
it
'sets the header correctly'
do
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
key
,
command
,
params
=
decode_workhorse_header
(
subject
)
...
...
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