satackey/action-docker-layer-caching

Reduce concurrency when storing and restoring layers

dhadka opened this issue · 3 comments

Describe the bug

storeLayers and restoreLayers should limit the number of concurrent calls to the cache service, otherwise it can hit throttling limits. Right now, this action processes all layers in parallel, resulting in a large number of calls to the cache service in a very short time period.

To Reproduce
I don't have a good repro, but we have seen at least one user of this action try to cache 200+ layers. Those requests are all sent within about 0.1 seconds :)

Expected behavior

The action should limit the number of concurrent store / restore requests to the cache service.

Debug logs
N/A

Runner Environment (please complete the following information):

  • OS: Any
  • Action version: v0.0.4

Additional context

Sorry for the overloaded API request.
I will work on this soon.

@dhadka Version 0.0.5 should solve this.

@NoamDev @satackey Perfect, thank you for the quick turnaround!