Fix scope of project export download throttling
What does this MR do and why?
Fixes the issue of project export downloads not being throttled per group.
The project import/export documentation currently states that export downloads are limited to "1 download per group per minute". The current behavior however only throttles export downloads within the scope of one project.
The following table compares the current behavior and the proposed behavior for throttling project export downloads, assuming the requests are made back-to-back within the span of one minute.
Current | New | |
---|---|---|
user1/project1 |
|
|
user1/project1 |
|
|
user1/project2 |
|
|
user2/project3 |
|
|
user2/project4 |
|
|
group1/project5 |
|
|
group1/project6 |
|
|
group1/subgroup/project7 |
|
|
group1/subgroup/project8 |
|
|
group2/project9 |
|
|
group2/project10 |
|
|
How to set up and validate locally
- Create exports of multiple different projects (e.g. two personal projects, two projects of group-1, two projects of group-2)
- Wait until all exports are ready for download
- Try to download all the exports back-to-back within the span of one minute
- Note that only the first download within a namespace succeeds, while others are throttled
Doing these steps on the current version would not result in any throttling at all, unless it gets tried to download one export twice.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #323637 (closed)