Add configurable timeout to cache upload
See original GitHub issueOver in the CodeQL team, we’ve recently started using the Actions cache (via the toolkit) in a scenario where we care only fairly minimally about the upload/download succeeding (it’s entirely optional) but we really care about returning quickly. In the cache downloading options, we found the segmentTimeoutInMs
field (here) which serves our use case well since we can set this to a small number to make sure we return quickly (our caches are small so they always fit in one segment).
However, there is no such option in the uploading options. Is there any chance you would be able to support this? We’ve considered some hacky workarounds like spawning a new process to do the upload, but it would really be much more robust if we could configure a timeout there in the same way we can do for the download.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
I will move this issue to actions/cache repo which is a more active target for monitoring by cache team.
We have certainly seen downloads hang without the
segmentTimeoutInMs
option specified (e.g. here). Even with that option specified, in fact, we sometimes get hangs before the actual download starts (e.g. here we observed a 15 minute hang before the download started, presumably on the API call that looks for where to get the cache from).We have not actually observed uploads failing nor hanging, but would still like to defend against this possibility so that a potential future outage in your service doesn’t cause a knock-on one for us.