gatsby-source-filesystem: create-remote-file-node does not handle retries #31310
Replies: 7 comments 1 reply
-
Thank you for opening this, @schoeneu Gatsby uses
Also related: sindresorhus/got#309 Which makes sense. So we do need to account for this in |
Beta Was this translation helpful? Give feedback.
-
This PR would benefit from a fix on this as well: #24288 It would also allow #15783 to use createRemoteFile again :) |
Beta Was this translation helpful? Give feedback.
-
@pieh I think this ticket was about retry not working. The PR now removed the (broken) retry. Still, if we get a network error, IMHO this is not fixed |
Beta Was this translation helpful? Give feedback.
-
Oh, I didn't notice the PR was linked to the issue, re-opening as functionally nothing changed |
Beta Was this translation helpful? Give feedback.
-
@pieh ohh 👌 |
Beta Was this translation helpful? Give feedback.
-
@LekoArts I am pretty sure that |
Beta Was this translation helpful? Give feedback.
-
This is fixed in the latest gatsby-source-filesystem@3 version. We added some extra logic to retry when we get partial responses. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
In https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-filesystem/src/create-remote-file-node.js#L162 , gatsby-source-filesystem tries to set up retries in case the remote connection breaks when creating a new file node.
However, the "got" documentation states that for "got.stream", the retry-option is ignored:
https://github.com/sindresorhus/got/blob/master/readme.md#retry
Steps to reproduce
Use a plugin that uses create-remote-file-node (for example remote-images) with a flaky server giving 502s sometimes. No retries will happen.
Expected result
5xx errors from server lead to retries.
Actual result
Instant breakage.
Beta Was this translation helpful? Give feedback.
All reactions