tespkg / actions-cache

Cache to S3 storage with official actions/cache@v2 fallback
MIT License
75 stars 31 forks source link

Fix 10s minimum time for cache restores #44

Closed welteki closed 8 months ago

welteki commented 8 months ago

We saw that every cache restore seems to take a minimum of 10s even for small 1MB caches from a local network using Minio or Seaweedfs.

The cause seems to be the listObjects function. It starts a timeout of 10s that is not cleared when the Promise is resolved or rejected. This causes the action to hang for a minimum of 10s even when the restore was faster.

Before fix:

Screenshot 2024-02-20 at 12 37 38

After fix:

Screenshot 2024-02-20 at 12 04 54

Changes

Fix Issues

Fixes #43

jackieli-tes commented 8 months ago

The change looks good to me. But I wonder why it worked before....

alexellis commented 8 months ago

Thanks for the merge and release @jackieli-tes

Do you use this action with ARC or something else?