aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
166 stars 55 forks source link

Connectivity to GitHub not working as expected #2017

Open moltco opened 1 week ago

moltco commented 1 week ago

Environment information

I have been directed here from AWS Amplify web console. The project I am trying to deploy to Amplify is Nextjs / typescript / node20 but this should not matter as the bug happens before this.

Describe the bug

I am asked to conenct GitHub to Amplify, which I do and get a screen from GitHub showing all-access permissions for AWS Amplify in region I am deploying to. However, when I go back to the web console it says the permissions are not there, I tried refreshing with the 'refresh' icon and refreshing the browser page and also tried few minutes later to let it "synch" but the connection between Amplify and GitHub just doesn't seem to be there. I also tried providing authorization to one repository and to all repositories in case this makes a difference. Let me know if I can provide any debug info - aside from "success" screenshots I don't have anything that I could send at the moment.

Reproduction steps

CReate new Amplify project, select GitHub integration, authorize AWS Amplify for one or all repositories. The Amplify does not "see" the newly established connection/authorization at GitHub

moltco commented 1 week ago

It seems that the connection is "there" but the drop-down box is not populated so the instructions "select from the drop down box your repository or update GitHub permissoins" are bad. If I type the repository name in the dropbox then I can proceed to the deployment stage. Which in my case initially failed because Amplify does not support pnpm build out-of-the-box in 2024 🤦‍♂️

so I would still consider this to be a bug or at least an undocumented feature.

Jay2113 commented 1 week ago

Hi @moltco 👋 , thanks for raising this! I was able to reproduce this behavior when attempting to create a new app while the regional GitHub app was authorized but not installed in my account. After doing a deep dive, it seems this experience can occur if the regional GitHub app is installed in any GitHub organization you belong to. As next steps, we will document this functionality to minimize friction when getting started with Amplify.

moltco commented 1 week ago

I'm glad it's not just me.

I noticed you were updating docs on environment variables and the fact you can't use aws_* in amplify. It would be great though if the document explained how to use these variables as they are automatically consumed by the aws nodejs libraries so you either need to create your own and then provide creds to the lobrary or then I noticed there are amplify_access_id etc which I wasn't clear what it was. So if the article can expand on how to do it (and considering the huge ecosystem) rather what you can't do that would be great.

The docs are huge and almost impenetrable, things are changing and half of the docs so not work with the latest versions or in vanilla contexts.

It's a huge job and the team is doing great job but it feels you need another 100 people to keep the docs in shape given the size of the ecosystem.

Thanks for your support

Jay2113 commented 1 week ago

We really appreciate the feedback around improving the documentation @moltco! Do you mind creating a new GitHub issue with similar details to track the docs improvement related to the environment variables setup when using the NodeJS library/SDK? Thanks!