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
image cache fails when path to Gatsby src changes #24571
Comments
Problem: Here is a long blog post about my findings: Solutions: |
This is still an issue - my build times are 2 hours because the cache is invalidated. I have a 50GB website, so a tmp folder is a workaround (that will become worse as my site grows) but not a fix, unfortunately. |
We have also run into this issue on dvc.org. On trying to diagnose it roughly a year ago we got the same symptoms from this issue's OP, but on a more recent attempt we had a completely new symptom. Basically, in our normal Heroku builds any time the image cache is reused, we get this error:
It took a while for us to diagnose that the cause was this Issue. Going from absolute to relative paths in cache hashing seems like it would be a minor change that would improve portability and compatability of Gatsby's OSS offering with other platforms. We've managed to work around it by implementing the quick fix described in the previous comment, but it's obviously less than ideal. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Description
the build process will generate all images again if the path of the Gatsby src folder changes and the cache exists from a previous build
Steps to reproduce
rename src folder (this simulates the situation in a code build ci where the source is checked out in a temp folder and the
public
and.cache
folder are restored from the last run.Expected result
Actual result
Images are regenerated
success Generating image thumbnails - 8.606s - 6/6 0.70/s
Environment
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.3.0 - /var/folders/c3/xp8j5jx90s37thp58v2_76t80000gr/T/yarn--1590669969769-0.11111835422606897/node
Yarn: 1.22.4 - /var/folders/c3/xp8j5jx90s37thp58v2_76t80000gr/T/yarn--1590669969769-0.11111835422606897/yarn
npm: 6.14.4 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 83.0.4103.61
Firefox: 75.0
Safari: 13.1
npmPackages:
gatsby: ^2.22.11 => 2.22.11
gatsby-image: ^2.4.5 => 2.4.5
gatsby-plugin-manifest: ^2.4.9 => 2.4.9
gatsby-plugin-offline: ^3.2.7 => 3.2.7
gatsby-plugin-react-helmet: ^3.3.2 => 3.3.2
gatsby-plugin-sharp: ^2.6.9 => 2.6.9
gatsby-source-filesystem: ^2.3.8 => 2.3.8
gatsby-transformer-sharp: ^2.5.3 => 2.5.3
The text was updated successfully, but these errors were encountered: