Hi, @ianbrode. The first set of logs show nothing being installed by yarn. The second set of logs shows many packages being installed (or at least it seems so as the logs are deleted for that section above).
Are these builds occurring in CircleCI or at Netlify? If they are at Netlify would you please send me the deploy ids for the two builds above?
If they are at CircleCI, how are you building there? Would you be willing to send us the the complete logs for those builds?
6:44:32 PM: [1/4] Resolving packages...
Actually this is installation of packages from cache. Build id: 5f7b3f49577052000785639d
In second example the yarn itself is being installed. And after that whole bunch of packages are installed from network, not from cache. Build id: 5fbd05bba4eec90008735e66
Hi, @ianbrode. I see exactly what you are talking about and there is an explanation.
I’m showing that the production branch for the site in question changed on 2020-11-22. However, no build happened for the “new production branch” (more about the quotes below) until after the build you sent first.
Why the quotes? Because this is a branch which was built for this site previously. It was, therefore, not a new branch but the production branch did change.
The change of the production branch forced the existing production build cache to be expired. These deploy previews therefore had no cache to load so they were installing dependencies without any cache.
When the production branch was finally built again, subsequent deploy previews began using the cache because it existed again.
The first production branch deploy after the change was deploy id 5fbd45aea9476f0007049a56 which happened at 9:41 AM PST. The next deploy preview at 10:39 AM (id 5fbd53693391520007c58b9c) then shows the yarn install using the cache.
The workaround to avoid having a missing cache for deploy previews is to always trigger a build after changing the production branch for a site. Note, a build must be successful before we will safe the cache.
I hope this clarifies the issue. If there are other questions though, please let us know.