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

feat(gatsby-source-wordpress): use gatsby-source-filesystem for remote file #29832

Closed
wants to merge 1 commit into from

Conversation

wardpeet
Copy link
Contributor

Description

Use gatsby-source-filesystem for create-remote-file-nodes. We added multiple retry mechanism when the server wasn't responding and fixed couple of bugs to reduce spam to the server.
Moving back to this module, fixed the issue I was locally getting to fetch file nodes.

I published an alpha version of this gatsby-source-wordpress@alpha-wp-fileystem

Documentation

Related Issues

@wardpeet wardpeet added the topic: source-wordpress Related to Gatsby's integration with WordPress label Feb 28, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 28, 2021
@wardpeet wardpeet removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 28, 2021
@wardpeet wardpeet requested a review from TylerBarnes February 28, 2021 12:53
@TylerBarnes
Copy link
Contributor

TylerBarnes commented Feb 28, 2021

Hey @wardpeet ! Thanks for this! Unfortunately this will cause a few problems because of modifications I made to this copy of create-remote-file-node 🤦 See this PR for a temporary fix #29813

The retry code here was swallowing the error you were getting which is that this copy of create-remote-file-node was importing an export that no longer exists in gatsby-source-filesystem (createProgress). The PR above temporarily fixes it (I'll be working on using the official create-remote-file-node asap after that's merged).

I need to PR some changes / fixes to create-remote-file-node before this plugin can use it - there is a caching bug in it when you retry the same request later - if a request fails in create-remote-file-node and then you externally retry it later, it's promise will never resolve and it'll freeze the build process in some cases because the request cache in that helper doesn't delete from the cache when the request fails. I also have some logic where I'm awaiting a promise elsewhere in the WP plugin that gets resolved in this helper - and my copy of that helper is wiring up a plugin option to request concurrency in the copy of the helper. It's a bit messy unfortunately but I'll be fixing it soon 👍 The mistake here is that I intended to PR fixes to create-remote-file-node a while ago and forgot while I was working on the WP plugin 🤦

@LekoArts LekoArts deleted the feat/wordpress-fetch-files branch July 2, 2021 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-wordpress Related to Gatsby's integration with WordPress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants