improve constant connection timeouts
follow up from #323
https://github.com/docker/buildx/pull/323#issuecomment-660722140
Maybe we should make these configurable. 20 sec might be ok but overall this makes the experience worse for the cases where instances never connect.
Another approach might be to try to see if it is in the middle of connecting already. Only cancel with timeout it there was no response at all.
@saulshanabrook
Another approach might be to try to see if it is in the middle of connecting already. Only cancel with timeout it there was no response at all.
That seems preferable! In that case, would it just keep waiting until it got a response or the network timed out?
In that case, would it just keep waiting until it got a response or the network timed out?
There would still be a timeout. But currently, I believe the timeout is for getting the whole response from the server. If we already get some response we can assume that server is just slow and not unresponsive and increase or reset the timeout.
Pending a more intelligent solution, could we use a shorter timeout, and add an option to ls to increase the timeout for slow connections?
speaking of consistency, with the SSH connection over docker context we have 30 seconds timeout, however the direct remote connection timeout in docker buildx is 20 seconds, which is hardcoded in many places
not sure if you find this approach appropriate, but here is the PR: https://github.com/docker/buildx/pull/2586