fix(manager): screenshot upload concurrency limit (DT-1532) #1191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Network can be overloaded when pushing too many screenshots at once.
Fixes: DT-1532
The Solution
This PR limits the concurrency rate at which screenshots can be pushed to 10 (at the same time). This means that if you need to push 12 screenshots it will first work on uploading the 10 first, then as soon as one is finished will pick the 11th, and then the 12th, never uploading more than 10 screenshots at the same time.
How to QA
It's a bit hard to QA, here's a test archive containing 14 slices, each with 14 variations, each featuring a unique 5-to-10MB screenshot (so it's 196 slices, worth about 1.3GB of screenshots to upload): https://drive.google.com/file/d/1jK-WExrxMklGmCJ8KXHz-iFz74_9ZXaI/view?usp=sharing
Once you have them, set them up in a Slice Machine project, and try running the init command. It's easier to reproduce the previous issue by running off a mobile hotspot in order to have a flakier internet (because direct link fiber connection was nailing it on my end)
Impact / Dependencies
/
Checklist before requesting a review