aws-amplify / aws-amplify/amplify-hosting
Redeploy this version button does not build from correct commit when previously deployed with webhook
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Redeploy this version builds and deploys incorrect version when using webhook.
**To Reproduce**
Steps to reproduce the behavior:
1. Turn off auto build in Amplify console for a particular branch (e. g. master)
2. Push code to master
3. Trigger webhook deploy from master branch to deploy build #1
4. Push more commits to master
5. Trigger webhook deploy from master branch to deploy build #2
6. Navigate to build history -> build #1 and hit _Redeploy this version_
**Expected behavior**
I exptected the build #1 to be redeployed. Instead HEAD was deployed.
**Additional context**
We use the webhook setup for master branch which is tied to production env as I do not want to auto deploy there. Since the redeploy this version does not work as expected with webhooks, I seem to have no way of rolling back production with Amplify Console and without messing with master branch.
As if the commit information was lost in the build if deployed via webhhook.
Contributor guide
Research direction
Start by reproducing the webhook sequence in the issue, then trace how the build history's “Redeploy this version” action preserves or loses the source commit. Done means redeploying build #1 checks out and deploys build #1's commit rather than the branch HEAD.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, git
- Domain
- ci-cd, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100