Open hongthach12 opened 1 month ago
Hi @hongthach12 👋 , thanks for reaching out. Can you share the Amplify app ids for both apps? Are you observing this build error for web preview or PR builds?
hi @Jay2113
Are you observing this build error for web preview or PR builds
this is build error for web
Can you share the Amplify app ids for both apps
App1: dsucf46bvwx38 App2: dgt3krpq2jhoh
@hongthach12 This build error can occur when Git tries to access a commit that no longer exists or was never created. This can happen due to force pushes, rebases, incorrect references in build configuration file amplify.yml
, or repository corruption. It typically arises from changes in the Git history or inconsistencies in the remote repository.
Additionally, you can try clearing the build cache in the amplify.yml
file:
frontend:
phases:
preBuild:
commands:
- rm -rf node_modules
- npm install
I see that your latest build (Build 21 for app dgt3krpq2jhoh
) has succeeded. Thus, are you unblocked?
@Jay2113 no,
i have check commit bebb03861c310222ecde1095d965c47d02e3d15, it's already exists on other repository (App1)
@hongthach12 I looked at the app ids and each of them are connected to a different repository. Can you elaborate on your workflow? Is it the following?
App ID: dsucf46bvwx38 -> Repository 1 > PR A > Commit ID: abcdef
App ID: dgt3krpq2jhoh -> Repository 2 > PR B > Commit ID: ghijklm
- Open a distinct PR against both repositories
- PR A is merged on repository 1 - Build is successful
- PR B is merged on repository 2 - Build fails since it uses commit id: abcdef which is for repository 1?
yes exactly @Jay2113
hi @Jay2113
Can you help to check:
Repo1 -> link to App1 (appId: dsucf46bvwx38) Repo2 -> link to App2 (appId: dgt3krpq2jhoh)
now, i got other issue
when i merge code on Repo1 --> Build App 1
BUT
App 2 build too with commit of Repo 1
Environment information
Description
This issue happend when i merged 2 PRs on 2 repository (App1, App2) in the same time on Amplify will be trigger deploy App1, App2 pending deploy. after App1 deploy finished , App2 start deploy, but on App2 using commitId of repository of App1 , I don't know why App2 using commit of repository of App1.
to fix it, i need to force push / or recreate branch of repository of app 2.
i thinks this issue of Amplify Deployment