aws-amplify / aws-amplify/amplify-hosting

Cannot rerun build from GitHub checks if build fail or stuck

Open
#3,261 2 comments 4 reactions 1 assignee Claimed by @Jay2113 View on GitHub
usability web-previews
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

d2kkwvuxfk7x4k

### AWS Region

ap-southeast-1

### Amplify Hosting feature

Deployments, Frontend builds, Git providers

### Describe the bug

I am hosting a create-react-app in amplify, and connected it to my repo in GitHub and enable PR Previews.

Sometimes when the build fail or get stuck, GitHub checks did not received any feedback from Amplify that the build has failed. The status in GitHub will continue to show -> _In Progress - This check has started_

I tried to rerun the amplify build from GitHub checks but it did not trigger a new build from amplify.

If I try manually to re-build from the Amplify itself, it did not send the new build message to GitHub checks. The checks status in GitHub will always points to the previous failed build.

The only way for me to overcome this is by manually do a dummy commit to the PR so that it can trigger back the build.

I hope there are more seamless options to do this.

### Expected behavior

- If the build fail, my GitHub checks will get a message from Amplify and check status will be updated in my GitHub.
- I can rerun the build from my GitHub PR checks.
- If I trigger the build manually from Amplify, it can also update the status build in my GitHub PR checks.

### Reproduction steps

1. Create a PR to merge feature branch to main branch.
2. If the build fail or get stuck (unresponsive), go to GitHub PR Checks and try to rerun the checks (build). It did not trigger the rebuild.
3. Manually go to Amplify console -> Preview -> Specific PR, try to click Redeploy this version, it will rebuild the app but it will not change the build/check status in GitHub PR Checks.

### Build Settings

```yaml
version: 1
frontend:
phases:
preBuild:
commands:
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
```

### Log output

```
# Put your logs below this line

```

### Additional information

Screenshot 2023-01-24 at 3 49 51 PM
Screenshot 2023-01-24 at 3 50 58 PM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.