Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-source-wordpress) Use send property for timeout (#31737) #31847

Merged

Conversation

ThyNameIsMud
Copy link
Contributor

Updates remote node fetch to use the send propety for timeout and adds overrides for timeouts (#31737)

Description

When a remote node is fetched by got there are competing timeouts that will cause the fetch to fail, and therefore, builds to fail due to requests being queued by the socket or the hosting service (i.e., AWS).

The plugin relies on a retry method for got to retry the request for specific status codes and network errors, however, got does not use this method for streams.

The change allows overriding of the CONNECTION_TIMEOUT, STALL_TIMEOUT, and STALL_RETRY_LIMIT variables using the same environment variables used by gatsby-source-filesystem.

Additionally, the change updates the timeout property used for got to reference the send timeout instead. The CONNECT_RETRY was removed since it's not being applied at all.

Documentation

GOT Timeouts: https://github.com/sindresorhus/got/tree/v11.7.0#timeout
GOT Retries: https://github.com/sindresorhus/got/tree/v11.7.0#retry

Related Issues

#31737

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 9, 2021
@TylerBarnes TylerBarnes added status: needs core review Currently awaiting review from Core team member topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 11, 2021
@TylerBarnes TylerBarnes requested review from wardpeet and removed request for wardpeet June 11, 2021 21:28
@TylerBarnes TylerBarnes added topic: source-wordpress Related to Gatsby's integration with WordPress and removed status: needs core review Currently awaiting review from Core team member topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) labels Jun 11, 2021
@TylerBarnes TylerBarnes self-requested a review June 11, 2021 21:28
Copy link
Contributor

@TylerBarnes TylerBarnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @ThyNameIsMud ! Just one small change request

@TylerBarnes TylerBarnes added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Jun 11, 2021
@gatsbybot gatsbybot merged commit c87d1d1 into gatsbyjs:master Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: source-wordpress Related to Gatsby's integration with WordPress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants