-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching build image causes a different app ID to be used for GitHub app check #3809
Comments
Hello! Thanks for reaching out to us. It seems like the same GitHub repository is connected to 2 different applications:
The It is expected for both status checks to show up on PRs. Can you check the repository's webhook settings? There should be 2 webhooks configured with each one pointing to one of the app IDs. The deployment on the |
Thanks for the quick reply @Narrator. I am curious about this other app, since I do not see it on the Amplify console at all and we have only created a single AWS App for our particular repo. Also, why does switching build image cause the app ID to change? I took a look at the webhook and there are 4 separate ones configured. Would you advise I nuke them and set them up again? |
Like I mentioned above, the other app belongs to an entirely different account ID - That's why you don't see the app in your current console.
Switching the build image should not cause the app ID to change. What is likely happening is that you already have multiple webhooks (one for each app) setup with your repo and only one of them is failing and thus, surfacing in your PR status code. However, if you believe that this is inaccurate, please share a screenshot of your status check panel - It will help us root cause the behavior!
Can you please look at the actual webhook URLs? There should be a query parameter attached to each URL like so: You can go ahead and delete them if you want - But please make sure that you are deleting the correct one by validating the app ID. |
@Narrator It seems like deleting the other webhooks and keeping the one with the correct app ID didn't work. Here is how the single webhook look like: And the status check is still showing an incorrect app ID: |
@terrymun I apologize for the confusion - The mechanism we use for PR status checks don't have to do with GitHub webhooks. Instead, we receive them via the GitHub app integration. When we receive webhook calls from the GitHub app, we receive a repository URL, using which we look up all the associated app IDs to run a build and perform the status check for. So when you have multiple apps in the same region attached to the same repository URL, then we kick off builds for each of those apps - However, we only publish a single status check for the region as a whole. So even though multiple status checks are being performed, we only publish one of them - This is a bug and we will take an action item for it. However, the fact that your repository URL is attached to multiple apps is not going to prevent one of those from failing unless you update the secondary app to also use the new build image. Otherwise, delete the app in the secondary account. You can also disable PR previews for the second app if you don't need it on the second app. |
@Narrator Thanks for the clarification! I have managed to find the second Amplify App that was somehow connected to the same repo. Deleting that app worked (we don't use it anyway). |
|
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d179m7yexeqiqu
AWS Region
eu-west-1
Amplify Hosting feature
Webhooks
Frontend framework
Next.js
Next.js version
14.0.3
Next.js router
App Router
Describe the bug
As part of the process to upgrade to
next@14
, we are switching the build image from Amazon Linux:2 to Amazing Linux:2023 as recommended, as it has[email protected]
installed.However it seems that the AWS Amplify Console Web Preview check that runs when a PR is created will use an incorrect app ID. Our app has an ID of
d179m7yexeqiqu
, but if the latest build image is used, the app ID switches todbrvsu6zabdup
in the check, which causes it to falsely report that the Preview deployment has failed as the app does not exist. The link shown at the bottom of the check indicates that an incorrect and unrelated app ID is used: https://console.aws.amazon.com/amplify/home?region=eu-west-1#/dbrvsu6zabdup/pr-880/1The correct links should be https://console.aws.amazon.com/amplify/home?region=eu-west-1#/d179m7yexeqiqu/pr-880/1
Expected behavior
The link generated by AWS Amplify Console Web Preview uses an incorrect app ID, and the check will fail as the app does not exist.
Reproduction steps
Build Settings
Log output
No error messages are produced, and the error is coming from the GitHub check from the Amplify app.
Additional information
No response
The text was updated successfully, but these errors were encountered: