Ok so some context on this first.
We had to migrate to Netlify when Gatsby Cloud was sunset.
We have been running on Netlify for over 6 months now and after some teething issues everything has been working fine.
We have recently upgraded to Gatsby 5 which has been causing problems with build failures.
I found a separate forum post regarding Netlify’s enforced installation of the gatsby-adapter-netlify causing problems with builds on v5.12 and above. So we enforced v5.11 to resolve this issue.
However we started seeing build failures for every contentful change.
Looking into this further there seemed to be a conflict with the cached files and the build with various errors on graphql missing pages etc.
Our set up was to
gatsby build to take advantage of the cache and speed up the builds.
We have put a temporary fix in place now so that we
gatsby clean and then
gatsby build for every content push.
This is not an ideal solution though as the build times have increased by 2 minutes per build.
So my questions are:
What is wrong with the way Gatsby/Netlify is handling the cache?
Is this a known error?
What is the solution to get this working again so we can see better build speeds for our content editors?