Can't rerun failed Netlify checks for GitHub PR

Site: https://fret.zone
PR: switch from CRA/Jest to Vite/Vitest by aqandrew · Pull Request #63 · aqandrew/fret-zone · GitHub

When I first opened this PR, all of the Netlify checks failed because of an incompatible Node version. E.g., Netlify

error sass@1.63.6: The engine node is incompatible with this module. Expected version >=14.0.0. Got 12.18.0

I fixed the error by setting a compatible Node version in the NODE_VERSION environment variable. I’ve since deployed successfully twice from that branch:

  1. Netlify
  2. Netlify

However, the PR is still marked as All checks have failed. I’ve gone into the details for each check and hit Re-run, and gotten GitHub’s banner of `You have successfully requested Header rules - fret-zone be rerun.

How can I rerun all of the failed checks? Any help on this would be much appreciated!

1 Like

Nevermind, I was able to re-run all checks by pushing an empty commit:

git commit -m "retrigger checks" --allow-empty

Thanks for sharing the solution with the community @aqandrew ! :raised_hands: :tada:

This doesn’t sound like a solution. What if the build fails for some other reason, a change in an integration that is not reflected in the code, for example, and we have to rebuild 7 branches, which have failed? Rebuilding them is easy, and successful, but we have to go to each of them and create a new commit just for GH to see the change, really? Isn’t there a better way to integrate with Github’s checks system?

1 Like

Netlify only runs checks once a commit is pushed as we don’t think you can have 2 different commit states for a same commit. Either your code fails to deploy or deploys successfully. If a commit failed, there’s high chance it would continue to fail until there’s a code change (yes that can be false in some cases). So triggering a commit is the only way to update it.

Same problem here. This is broken. Pushing a new empty commit to fix a flaky Netlify deploy means also rerunning all the CI, which itself might be flaky too, on top of being slow.

Netlify should update the GitHub check when a build is rerun, like GitHub Actions or CircleCI are doing.