netlify-plugin-gatsby icon indicating copy to clipboard operation
netlify-plugin-gatsby copied to clipboard

New/Custom Gatsby Cache Values Not Working

Open stevepepple opened this issue 3 years ago • 4 comments

Thanks for reporting this bug!

If this is related to a typo or the documentation being unclear, please click on the relevant page's Edit button (pencil icon) and suggest a correction instead.

Please search other issues to make sure this bug has not already been reported.

Then fill in the sections below.

Describe the bug

In my local build, I'm using the Gatsby API (v3.x) to cache data during the build process. (https://www.gatsbyjs.com/docs/build-caching/)

I see that after a successful build the data is added to the cache. When the subsequent build occurs, the logs say that Netlify/Gatsby found a previous cache. However, the value I set in the cache during the previous build is null.

Any ideas what might not be working or if this use case is supported?

Steps to reproduce

  1. Update Gatsby cache during the createPage and onPostBootstrap lifecycle.
  2. Confirm that build is successful
  3. Build again and debug the cache.
  4. Cache for value added in step #1 is empty/null.

Example:

  1. Type the following command: [...]
  2. etc.

Expected behavior

A clear and concise description of what you expected to happen.

Configuration

Using Gatsby 3.14.6 with the V2 Netlify plugins.

Environment

System: OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster) CPU: (8) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Shell: 5.0.3 - /bin/bash Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 1.22.15 - /usr/bin/yarn npm: 6.14.15 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python

Enter the following command in a terminal and copy/paste its output:

npx envinfo --system --binaries --browsers --npmPackages @netlify/plugin-gatsby

System: OS: Linux 5.4 Debian GNU/Linux 10 (buster) 10 (buster) CPU: (8) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz Memory: 1.43 GB / 15.63 GB Container: Yes Shell: 5.0.3 - /bin/bash Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 1.22.15 - /usr/bin/yarn npm: 6.14.15 - /usr/local/bin/npm

Screenshots

If applicable, add screenshots to help explain your problem.

Can you submit a pull request?

Maybe.

Pull requests are welcome! If you would like to help us fix this bug, please check our contributions guidelines.

stevepepple avatar Feb 01 '22 20:02 stevepepple

@stevepepple, is this still an issue for you?

nickytonline avatar Jun 27 '22 19:06 nickytonline

@stevepepple, is this still an issue for you?

@nickytonline I'll test again this week and confirm. Which version should I try?

stevepepple avatar Jun 27 '22 22:06 stevepepple

Just grab the latest version. 😎

nickytonline avatar Jul 01 '22 00:07 nickytonline

Hi @stevepepple , just following up on my colleague's earlier message - did the latest version of the plugin resolve the issue for you?

ericapisani avatar Oct 13 '22 18:10 ericapisani

Closing due to no response. If this continues to be an issue, please re-open.

sarahetter avatar Oct 24 '22 15:10 sarahetter