Commit a0ac413e authored by Alessio Caiazza's avatar Alessio Caiazza

Merge branch '330-accelerated-upload-endpoint-for-requirements-import-csv' into 'master'

Add upload acceleration for Requirements import

See merge request gitlab-org/gitlab-workhorse!664
parents 6a7a37f6 65621159
---
title: Add direct upload acceleration for requirements import
merge_request:
author:
type: added
...@@ -270,6 +270,9 @@ func (u *upstream) configureRoutes() { ...@@ -270,6 +270,9 @@ func (u *upstream) configureRoutes() {
// Metric image upload // Metric image upload
u.route("POST", apiPattern+`v4/projects/[0-9]+/issues/[0-9]+/metric_images\z`, upload.Accelerate(api, signingProxy, preparers.uploads)), u.route("POST", apiPattern+`v4/projects/[0-9]+/issues/[0-9]+/metric_images\z`, upload.Accelerate(api, signingProxy, preparers.uploads)),
// Requirements Import via UI upload acceleration
u.route("POST", projectPattern+`requirements_management/requirements/import_csv`, upload.Accelerate(api, signingProxy, preparers.uploads)),
// Explicitly proxy API requests // Explicitly proxy API requests
u.route("", apiPattern, proxy), u.route("", apiPattern, proxy),
u.route("", ciAPIPattern, proxy), u.route("", ciAPIPattern, proxy),
......
...@@ -121,6 +121,7 @@ func TestAcceleratedUpload(t *testing.T) { ...@@ -121,6 +121,7 @@ func TestAcceleratedUpload(t *testing.T) {
{"POST", `/import/gitlab_group`, true}, {"POST", `/import/gitlab_group`, true},
{"POST", `/api/v4/projects/9001/packages/pypi`, true}, {"POST", `/api/v4/projects/9001/packages/pypi`, true},
{"POST", `/api/v4/projects/9001/issues/30/metric_images`, true}, {"POST", `/api/v4/projects/9001/issues/30/metric_images`, true},
{"POST", `/my/project/-/requirements_management/requirements/import_csv`, true},
} }
for _, tt := range tests { for _, tt := range tests {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment