Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
df7e48ec
Commit
df7e48ec
authored
Jul 25, 2019
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accelerate GraphQL uploads
parent
7d254e63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
internal/upstream/routes.go
internal/upstream/routes.go
+1
-0
upload_test.go
upload_test.go
+7
-1
No files found.
internal/upstream/routes.go
View file @
df7e48ec
...
@@ -206,6 +206,7 @@ func (u *upstream) configureRoutes() {
...
@@ -206,6 +206,7 @@ func (u *upstream) configureRoutes() {
// we need to declare each routes until we have fixed all the routes on the rails codebase.
// we need to declare each routes until we have fixed all the routes on the rails codebase.
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
// Overall status can be seen at https://gitlab.com/groups/gitlab-org/-/epics/1802#current-status
route
(
"POST"
,
apiPattern
+
`v4/projects/[0-9]+/wikis/attachments\z`
,
uploadAccelerateProxy
),
route
(
"POST"
,
apiPattern
+
`v4/projects/[0-9]+/wikis/attachments\z`
,
uploadAccelerateProxy
),
route
(
"POST"
,
apiPattern
+
`graphql\z`
,
uploadAccelerateProxy
),
// Explicitly proxy API requests
// Explicitly proxy API requests
route
(
""
,
apiPattern
,
proxy
),
route
(
""
,
apiPattern
,
proxy
),
...
...
upload_test.go
View file @
df7e48ec
...
@@ -116,7 +116,13 @@ func TestAcceleratedUpload(t *testing.T) {
...
@@ -116,7 +116,13 @@ func TestAcceleratedUpload(t *testing.T) {
ws
:=
startWorkhorseServer
(
ts
.
URL
)
ws
:=
startWorkhorseServer
(
ts
.
URL
)
defer
ws
.
Close
()
defer
ws
.
Close
()
resources
:=
[]
string
{
`/example`
,
`/uploads/personal_snippet`
,
`/uploads/user`
,
`/api/v4/projects/1/wikis/attachments`
}
resources
:=
[]
string
{
`/example`
,
`/uploads/personal_snippet`
,
`/uploads/user`
,
`/api/v4/projects/1/wikis/attachments`
,
`/api/graphql`
,
}
for
_
,
resource
:=
range
resources
{
for
_
,
resource
:=
range
resources
{
reqBody
,
contentType
,
err
:=
multipartBodyWithFile
()
reqBody
,
contentType
,
err
:=
multipartBodyWithFile
()
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
...
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