Issues with building pull request deploy previews

Without changing any settings, our site stopped building deploy previews:
E.g. this one is missing one: Update CODE_OF_CONDUCT.md by lucasvo · Pull Request #186 · centrifuge/website · GitHub

The last time it built deploy previews was march 20th. It works for all other sites we have but not this repository. Do you know why?

It’s tough to say why this occurred, but try reconnecting the repository to that Netlify app. I’ve had to do this a few times in the past.

Definitely a good place to start, @madikarizma! Thanks for suggesting.

@ejfasf, could you please share your Netilfy url so we can dig in further?

In the meantime, one other thing to check out would be your settings around sensitive environment variables:

We recently rolled out that feature to provide people with more control over how they handle PRs on their public repos.

Hi Jen,

We did allow untrusted deploys, I don’t think that’s the issue.

Here’s the URL: Netlify App

regards,

Lucas

According to your settings here:

we’ll build only PR’s that target the master branch. That PR you linked does not target master, thus we wouldn’t try to build it.

I’ve got my own PR in to update the wording on that page to look more like this which is a better reflection of the truth:

But, TL;DR we’ll build only PR’s targeting the branches shown on the deploy context settings.

Thanks for clarifying. I am pretty sure the behavior of this changed recently. Is that correct? We never had this issue in the past.

If the production branch is master and branch deploys is set to all and deploy previews to any, should a PR to develop be built or not? This is how I have it configured now without any luck:
Test: Add ERC20 widget by lucasvo · Pull Request #55 · centrifuge/axis · GitHub // Netlify App

Nope, it’s worked that way for 3.5 years now :slight_smile:

Perhaps you changed your settings recently from “deploy all branches” to something smaller? Your proposed setting of “build all branches” + “build PR’s” should indeed make a build for every commit.

You will need to open NEW PR’s - we may not pick up already-in-flight ones that were opened before you changed your settings.

Hi @fool,

I asked be if it has changed recently because this ran perfectly fine for our repos until very recently (2mo ago) and has suddenly changed. We’ve used netlify+github for two years on the site I’m having an issue with. Unfortunately builds are not being triggered, here’s one of today: update homepage by sounak98 · Pull Request #189 · centrifuge/website · GitHub that did not trigger building this site:
Netlify App

Any chance this could be a bug on your end?

You’ve linked us to a medium post rather than a commit - mind updating your details?

It could certainly be a bug, but that would be surprising, since you are one of hundreds of thousands using this workflow and nobody else has seen anything, so we’ll keep debugging and see where it leads us :slight_smile:

oops, I fixed the link.

We merged something into master today which did not trigger a build either:

github - com centrifuge/website/commit/09ad524d561a10a0fe2df134e206c0600247588f

(For some reason discourse is not accepting github as a link)

It seems like you’re not getting webhooks reliably from github?

Your assertion that we aren’t getting hooks reliably feels unlikely to me, or we would have heard about it further, so let’s keep debugging :slight_smile:

We can’t see anything about what GitHub sends, but you can! Since you don’t use our github app on that website (perhaps this is actually the accident? Someone unhooked our GitHub app at your org in the GitHub admin settings?), could you tell us what you see on the configuration at GitHub under Settings->Hooks looks like? If you don’t have a webhook pointing to https://api.netlify.com/hooks/github then you aren’t even trying to notify us with your current setup, so no bug, just misconfiguration…

It does not show up under Hooks but it does show up in the installed apps section:

Great start! Could you please as I asked hit the “configure” button and screenshot THAT for us?

Here you go:

Hey @ejfasf,

Just so we can be sure that you’re up-and-going again, have you tried reconnecting the repo to the App? This, 9/10, will solve the issue.

Yes, I have done that multiple times most recently after I filed the original issue. It did not resolve it.

I’m still not seeing PRs previews being built. Github is showing pending checks but nothing is happening.

By any chance do you have protected branches enabled in GitHub?

This might be inhibiting the checks.

@Scott we use protected branches but we have been doing that for a long time. I don’t think this is related. The setup did not change in the last year and it only recently stopped working.

How can we get netlify to start building our PRs again?

Hey @ejasf,

I’ve checked to see whether we have associated a repo with your site, centrifuge.io. This is returning null – reconnecting your repo with App has failed. Can you give this another try for me, please?