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
eb926dd3
Commit
eb926dd3
authored
Nov 19, 2020
by
Sean Arnold
Committed by
Alessio Caiazza
Nov 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move metric image upload path and change type
Add spec
parent
61ea14fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
changelogs/unreleased/sarnold-metric-image-upload-route.yml
changelogs/unreleased/sarnold-metric-image-upload-route.yml
+5
-0
internal/upstream/routes.go
internal/upstream/routes.go
+3
-0
upload_test.go
upload_test.go
+1
-0
No files found.
changelogs/unreleased/sarnold-metric-image-upload-route.yml
0 → 100644
View file @
eb926dd3
---
title
:
Add direct upload acceleration for metric images
merge_request
:
653
author
:
type
:
added
internal/upstream/routes.go
View file @
eb926dd3
...
...
@@ -267,6 +267,9 @@ func (u *upstream) configureRoutes() {
// Group Import via UI upload acceleration
u
.
route
(
"POST"
,
importPattern
+
`gitlab_group`
,
upload
.
Accelerate
(
api
,
signingProxy
,
preparers
.
uploads
)),
// Metric image upload
u
.
route
(
"POST"
,
apiPattern
+
`v4/projects/[0-9]+/issues/[0-9]+/metric_images\z`
,
upload
.
Accelerate
(
api
,
signingProxy
,
preparers
.
uploads
)),
// Explicitly proxy API requests
u
.
route
(
""
,
apiPattern
,
proxy
),
u
.
route
(
""
,
ciAPIPattern
,
proxy
),
...
...
upload_test.go
View file @
eb926dd3
...
...
@@ -120,6 +120,7 @@ func TestAcceleratedUpload(t *testing.T) {
{
"POST"
,
`/import/gitlab_project`
,
true
},
{
"POST"
,
`/import/gitlab_group`
,
true
},
{
"POST"
,
`/api/v4/projects/9001/packages/pypi`
,
true
},
{
"POST"
,
`/api/v4/projects/9001/issues/30/metric_images`
,
true
},
}
for
_
,
tt
:=
range
tests
{
...
...
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