It appears that when installing package.json dependencies from github, that those dependencies are not properly being cleared from the cache when using the “Clear cache and retry with latest branch commit”.
for example, my package.json has a dependency like "dmno": "github:theoephraim/dmno#path:packages/core",
In my case Im testing some deployment and netlify build plugin related features, so republishing isn’t really an option.
Any guidance on how the caching around github works and any workarounds I could use to trick netlify into reloading it?
I created a new build plugin (GitHub - theoephraim/netlify-cache-test) that lives only in a git repo with a simple build hook that logs a message. I’ve installed that plugin in another site (ID = 054a285c-bcd7-4063-84f5-18ebe3eabd68) as a dependency via github - ie my package.json includes (and I’m using PNPM)
I install the plugin in my netlify toml and I can see the message logging successfully. I update the log message and push a new commit to github. Rerun the build and I see the previous message. Re-run with cleared cache and I see the same thing.
Switching to pulling in the dependency via a tarball makes it work properly.
All of this makes me assume the platform has some difference caching logic going on for github.
I’ve checked the recent deploys for that site id and I do not see the behavior you describe. Would you help us to troubleshoot by providing the deploy id where you removed the plugin from netlify.toml?
Also, would you be willing to grant access to my GitHub user to the private repo being used for the site? If so, my GitHub username is overlordofmu.
Here is a new simpler repro - site id 92bf552b-015a-4751-9a71-0926a271b3ca
Ive added you as a collaborator to both the site repo and the plugin repo.
The issue is not removing the plugin, it’s that I have updated the plugin in the git repo, and the build process is not pulling the latest from github, even when running “retry with cleared cache”.
You can see in the build logs that the hook is printing the “v2” message, but you can see the latest commit should be showing “v3”.
Just to be sure, I also tried doing a normal commit (rather than a force push) and updating the version in package.json (although I do not want to have to do that) - and neither made any difference.