aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
457 stars 115 forks source link

Build failure not communicated to GitHub pull request #2575

Closed aimeeu closed 2 years ago

aimeeu commented 2 years ago

Before opening, please confirm:

App Id

arn:aws:amplify:us-east-2:025179128306:apps/dqjx68ea5d3rv

Region

us-east-2

Amplify Console feature

Notifications

Describe the bug

AWS Amplify integration with GitHub pull requests (AWS Amplify Console Web Preview)

I am evaluating AWS Amplify as a host for my company's static docs site, which uses Hugo. I deployed a static Hugo website called docsy-example, linked to my GitHub repo aimeeu/docsy-example. I created a new branch and created a PR. The PR built successfully; web preview generated successfully. I then deliberately created a commit that I know will not build and pushed to an existing PR to see how the Amplify-GitHub integration (AWS Amplify Console Web Preview) displays a build failure. The build failed in Amplify in under 2 minutes, but Amplify doesn't appear to have notified GitHub. The PR doesn't reflect the build failure. The GitHub PR Conversation tab says "In progress - This check has started" and the Checks tab shows a process clock that keeps accruing time. The AWS Amplify Console Web Preview doesn't even time out (20+ hours and still "running").

Monday 14 February 2022

image

image

image

Expected behavior

I expect the GitHub PR Conversation UI to reflect the AWS Amplify Console Web Preview build failure.

Reproduction steps

  1. Deploy a static Hugo website
  2. Create a new branch (ie git checkout -b new-branch)
  3. Create a pull request that builds (ie, add a new page)
  4. Push a commit that you know does not build (ie, add a new shortcode, use the shortcode on a page, commit the page but don't commit the new shortcode file)

Build Settings

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm install
    build:
      commands:
        - wget https://github.com/gohugoio/hugo/releases/download/v${VERSION_HUGO}/hugo_extended_${VERSION_HUGO}_Linux-64bit.tar.gz
        - tar --overwrite -xf hugo_extended_${VERSION_HUGO}_Linux-64bit.tar.gz hugo
        - mv hugo /usr/bin/hugo
        - rm -rf hugo_extended_${VERSION_HUGO}_Linux-64bit.tar.gz
        - hugo version
        - cd themes/docsy && git submodule update -f --init && cd ../.. && hugo
  artifacts:
    baseDirectory: public
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Additional information

Possibly related to https://github.com/aws-amplify/amplify-console/issues/367

github-actions[bot] commented 2 years ago

Hi :wave:, thanks for opening! While we look into this...

If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions.

Lastly, please make sure you've specified the App ID and Region in the issue!

rkokhatskyi commented 2 years ago

I'm also facing this issue. If the related Amplify build fails - PR build will stuck in progress state without any feedback

kdaulton-chwy commented 2 years ago

I'm getting the same issue with any build failures in Amplify:

Screen Shot 2022-03-10 at 2 45 39 PM .

jchabotamica commented 2 years ago

Same exact issue here

neekey commented 2 years ago

same issue here

arbass22 commented 2 years ago

We are also experiencing this issue

aalyokhin commented 2 years ago

Is there any update about this? We’ve got this issue as well and it has significant impact on our workflow.

DanielJSottile commented 2 years ago

Same issue here. For my team, the checks are not consistent either, as some will pass/fail, while others will stall indefinitely. Build/deployment succeeds but we can't use the check right now to verify PR's

johnstonmatt commented 2 years ago

Same issue here, failures are not being communicated back to GitHub, developers unfamiliar with this quirk can waste a lot of time waiting for a build that will never finish

ganipcanot commented 2 years ago

We recently addressed and fixed this issue. Please give it another try and let us know if you are still experiencing issues.

aimeeu commented 2 years ago

We recently addressed and fixed this issue. Please give it another try and let us know if you are still experiencing issues. @ganipcanot The build failed in under a minute in Amplify. The GitHub UI did return a build failure about 3 minutes after the commit. Thank you for fixing the issue!

ganipcanot commented 2 years ago

Great! Thanks for double checking I’ll close this issue for now. Feel free to reopen or open a new issue if you find something else that needs fixing!

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.