amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Builds not being triggered after migration to github app

Open christophersutton opened this issue 2 years ago • 21 comments

Before opening, please confirm:

App Id

d3o2mfqbaswdfz

Region

us-west-2

Amplify Hosting feature

Not applicable

Describe the bug

New commits are not triggering builds after going through the "Migrate to our GitHub App" steps. Prior to going through those migration steps new builds would be triggered upon commit. Within Github the app appears to be configured correctly and has access to the appropriate repo etc, and I also receive a success message from within Amplify. Screen Shot 2022-05-11 at 8 48 20 AM

I do not appear to have any webhooks installed on the repo, so it seems possible that it's failing on the last step to finalize the installation, where it should delete the old webhooks and install new ones, possibly it only deleted the old and no new one was installed.

Expected behavior

When I commit a change to the repo, builds will be automatically kicked off.

Reproduction steps

  1. Migrate to Github App
  2. Commit change to repo
  3. No build is kicked off

Build Settings

No response

Additional information

No response

christophersutton avatar May 11 '22 13:05 christophersutton

This is blocking our deployments so I'd really love to hear what steps we can take to revert back to oauth or do manual deploys without downtime. From the docs I don't really see how I can switch to manual deploys without tearing down the current production deploy and starting over, which doesn't seem like a great solution, but maybe I'm missing something. Many thanks.

christophersutton avatar May 12 '22 13:05 christophersutton

Hi @christophersutton 👋🏽 I'm working on reproducing this behavior and syncing with the team on a workaround. In the mean time, have you tried reconnecting your repository in general settings?

ghost avatar May 12 '22 14:05 ghost

Hi @hloriana, thanks for taking a look. I just reconnected in general settings and pushed to a feature branch but it's still not picking up the commit.

christophersutton avatar May 12 '22 14:05 christophersutton

@christophersutton I was not able to produce this behavior. Does your repo belong to a GitHub organization?

ghost avatar May 12 '22 16:05 ghost

For a workaround, please use this guide to setup an incoming webhook and use the curl command to trigger builds: https://docs.aws.amazon.com/amplify/latest/userguide/webhooks.html

We are deep diving on this issue. Thank you for your patience!

ghost avatar May 12 '22 16:05 ghost

That webhook workaround is easy enough, many thanks. And yes the repo does belong to a Github organization.

christophersutton avatar May 12 '22 18:05 christophersutton

For a workaround, please use this guide to setup an incoming webhook and use the curl command to trigger builds: https://docs.aws.amazon.com/amplify/latest/userguide/webhooks.html

We are deep diving on this issue. Thank you for your patience!

This solution is working, thanks!

shreyas3336 avatar May 18 '22 06:05 shreyas3336

Same for us.

aullrich avatar May 19 '22 13:05 aullrich

+1 on the issue, the connected repo is private and part of a GitHub organization. Deploys were working normally earlier today until we switched to GH Apps.

Using the webhook workaround for now, but any news on this issue @hloriana?

Thanks!

lucas-varela avatar May 29 '22 22:05 lucas-varela

Same here, builds not being triggered after migration.

mdecastro avatar May 30 '22 19:05 mdecastro

Having the same issue, i see the "Migrate to our GitHub App" banner in the console even though i've migrated successfully multiple times. any ETA for the fix? or workaround that doesn't involve webhooks?

zainsattar-avomd avatar Jun 03 '22 14:06 zainsattar-avomd

Having the same issue here after moving repositories from GitLab to GitHub. Amplify shows the repo as connected sucessfully but does not create the webhook config in GitHub. Clicking the button "Reconnect Repository" actually breaks working project, it will delete the existing webhook but not create new ones.

ogobilliard avatar Jun 10 '22 15:06 ogobilliard

+1 Exactly the same except my private repo is NOT part of an organization. I'll use the workaround for now. Commenting here mostly just so I'll get alerted when this is fixed.

mkane91301 avatar Jul 04 '22 16:07 mkane91301

+1 Also having this issue with a public repository owned by an organization. The configuration has always been the same until I wanted to migrate to the GitHub app. I was already using the manual webhook for release builds, but this is blocking me from having automatic preview deployments for PRs! It seems like there have been several reports of this bug and multiple supposed fixes, what's going on here?

loafofpiecrust avatar Jul 21 '22 07:07 loafofpiecrust

I have it working now, I just had to re connect the repo. There is a button in the "General" section.

mdecastro avatar Jul 21 '22 12:07 mdecastro

I tried that already about five times to no avail, even after manually deleting the github webhook.

loafofpiecrust avatar Jul 21 '22 15:07 loafofpiecrust

+1 on the issue, is there a method to add back the old webhooks to Github? Or what parameters should I put in Github's settings?

thecodehen avatar Aug 22 '22 04:08 thecodehen