We have a complex monorepo setup and we have been using the ignore command which works fine most of the time. But sometimes it cancels the build when it shouldn’t. The
reason isn’t clear, force push / new branch, no previous build, commit diff isn’t correct, I don’t know.
But it is quite annoying. (need to remove the ignore command, then make a build, then put it back)
Our check is simple git diff --quiet "${CACHED_COMMIT_REF}" "${COMMIT_REF}" some_folders
One thing that would help to figure out what’s going on is logging CACHED_COMMIT_REF and COMMIT_REF. Because maybe these aren’t the expected ones.
That said, it would be even easier if we could force a build as a last resort when the build is canceled for no apparent reason.
It looks similar. The other user also has the same troubles, not knowing what’s happening. So we can’t really act.
That’s why I asked about logging the 2 commits variables used for the diff. Actually, it would be nice to log all env variables of Netlify that may influence a build right at the beginning. (excluding possible sensitive ones)
For example, if a build fails, what commits will be used for the diff. Or if I force push on git, what is the value of CACHED_COMMIT_REF and COMMIT_REF?
Another thing is, I had to make a change in the Netlify config for a site (deployment settings) because it was an old branch not taking into account the new build process and the build failed. The problem is then the only way to trigger a build is to send a dummy commit and even that didn’t work in one situation.
So, that’s why I made this feature request. It is hard to debug and get the perfect behaviour.
I mentioned above that we have a monorepo. So the command is already there when we create a new site. And sometimes the ignore check needs to be removed then readded.
Then we wouldn’t be able to have netlify.toml per app. I dont think it’s really relevant to this feature request to be honest. I have mentioned a couple of scenarios where the build is ignored.
There are always edge cases or simply no time to make this perfect. Thus having a “force build” makes sense and should be pretty simple to implement on Netlify’ side.
Actually I was expecting the “clear cache and deploy” option to solve the issue but it does not.
running into this issue with monorepo as well, i am surprised netlify is not implementing the clear cache and deploy correctly. or at least useful to those who are using monorepo. it is a pain in the ass and there is no workaround. it is simply bugged.
Workaround right now for monorepo is to simply remove the ignore command, which is not ideal!!