Commit 65621159 authored by Eugenia Grieff's avatar Eugenia Grieff Committed by Alessio Caiazza

Add upload acceleration for requirements import

- Add spec
parent 6a7a37f6
---
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