Skip to content

Test Replay: [Upload] Update timeout logic to fail faster on catastrophic timeouts #28890

@ryanthemanuel

Description

@ryanthemanuel

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:

  • Reducing the upload time based on some maximum upload times we've seen in the wild
    • 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 events
    • We should mimic what @cypress/request does and provide timeouts in multiple scenarios (https://github.com/cypress-io/request/blob/master/request.js#L799-L851):
      1. socket connect (to upstream)
      2. response sent (headers/status code)
      3. data flowing
      4. response complete (possibly this one should be very high)
  • Detect when a timeout has occurred more than once and fail immediately (other retries would work as they do today)

More context:

Why is this needed?

No response

Other

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions