Cannot rerun build from GitHub checks if build fail or stuck
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [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
- Create a PR to merge feature branch to main branch.
- 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.
- 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
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
Hi @syazwanz 👋 , thanks for raising this and for sharing detailed information about the issue.
If the build fail, my GitHub checks will get a message from Amplify and check status will be updated in my GitHub.
During my testing, when the amplify build failed the corresponding GitHub check also failed:
Are you able to actively reproduce this?
I can rerun the build from my GitHub PR checks.
This workflow/feature is currently not supported with web previews.
If I trigger the build manually from Amplify, it can also update the status build in my GitHub PR checks.
For this particular scenario, if you push a new commit which will successfully build and deploy in Amplify, the corresponding GitHub PR checks will then get updated and pass. I was able to test this behavior. Are you observing otherwise?
Could this be fixed it is kinda of annoying to push an empty commit just for the deployment to rerun.