Closed ryanthemanuel closed 5 months ago
I think we can simplify this a little - copying what @cypress/request does may not be the best course.
cypress/request connection timeouts have a maximum of the OS-wide TCP connection timeout. Increasing this won't have any effect, and reducing this would probably only cause a higher error rate. I'd prefer to keep this at the OS-specified value; extending @packages/network Agent will be expensive to implement, and likely won't have a high rate of return.
Status code available sent is only important in error cases I think, which will simply reject the promise.
Data flowing is a great metric for timing out an upload, because it's what's important to the success of the upload.
I suggest:
fetch
being called and the first .write to an intermediate .pipe from the artifact's ReadableStream. This handles: socket connect, http status/headers available (if sent prior to upload beginning). This is to detect initial connection errors.What do you think?
What would you like?
Currently, the logic for timing out on uploading test replay data is set at 2 minutes. We also have retrying logic that attempts to retry 8 times on failures. This ends up being over 16 minutes of waiting if the upload URL will never be reachable. To resolve this, I propose:
node-fetch
may not support all that we want to do here, but we can likely tap into our agent to listen to the appropriate eventsMore context:
Why is this needed?
No response
Other
No response