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-filesystem): fix extension guessing on warm cache #24613

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

pieh
Copy link
Contributor

@pieh pieh commented May 29, 2020

Description

We have logic to auto-guess extension if it can't be derived from url provide to createRemoteFileNode. This currently doesn't work on warm cache, because 304 reponses don't have body, so temp file is 0 bytes and there is nothing to guess extension from. To fix that we cache extension guessed on initial 200 response and use it whenever we get 304 response for same url.

Related Issues

Fixes #24453

@pieh pieh requested a review from a team as a code owner May 29, 2020 13:05
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 29, 2020
@pieh pieh added status: needs core review Currently awaiting review from Core team member and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 29, 2020
@danabrit danabrit added the topic: data Relates to source-nodes, internal-data-bridge, and node creation label May 29, 2020
@wardpeet wardpeet self-assigned this Jun 2, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

LGTM!

@wardpeet wardpeet merged commit 93da8e1 into master Jun 2, 2020
@wardpeet wardpeet deleted the crfn-store-and-reuse-found-extension-on-304 branch June 2, 2020 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs core review Currently awaiting review from Core team member topic: data Relates to source-nodes, internal-data-bridge, and node creation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createRemoteFileNode doesn't use inferred fileType to check existence
3 participants