aws-amplify / amplify-studio

AWS Amplify Studio (Formerly Admin UI)
136 stars 31 forks source link

graphql based on sql api deployment hangs on your new data model is being deployed admin ui message #328

Open Bartman250 opened 3 years ago

Bartman250 commented 3 years ago

Before opening, please confirm:

App Id

dg24riwqqhzih

Region

eu-north-1

Environment name

dev

Amplify CLI Version

6.0.1

If applicable, what version of Node.js are you using?

v14.16.1

What operating system are you using?

Mac Big Sur

Browser type?

Chrome

Describe the bug

Attempted to deploy a new graphql api against an Aurora (mysql) datasource. The data source is in eu-west-2 (london) The App sync app is in eu-north1 (stockholm).

I've created the database and successfully using these instructions:

https://docs.amplify.aws/cli/graphql-transformer/relational/

But Graphql queries are returning nulls and the Data Tab in the Admin UI is displaying "Your new data model is being deployed"

Expected behavior

I should be able to make graphql mutations and queries to the Aurora SQL database

Reproduction steps

Basically following these instructions to create amazon Aurora database

https://docs.amplify.aws/cli/graphql-transformer/relational/

After running this command

api add-graphql-datasource

I did amplify push

The schema and resolvers are generated successfully.

But when I try out the graphql queries and mutations in App Sync they respond with nulls.

When I look at the 'data' panel in the admin I see the message 'Your new data model is being deployed' It stayed like this from Friday 24th September.

I tried redeploying again, but same result. I can see in the deployment log "Amplify backend deployment initiated." with "UPDATE_IN_PROGRESS" but this is just hanging.

Looking at cloud formation it is showing a number of tasks still in progress, none of which are completing.

The specific task list is

amplify-tranchedemo-dev-122301-apiamplifymonetapi-1IV2ZH-amplifymonetapitrancherdsjson-1W2RLLUF7YVQ0

Hope you can help, please let me know if you need anymore information thankyou

Additional information

image

image

yppartyk commented 3 years ago

Hi @Bartman250, thank you for reaching out. The issue should now be fixed. Please try again and let us know if you are still experiencing it.

Bartman250 commented 3 years ago

Hello @yppartyk Thanks for looking into this. Unfortunately, the Admin UI/Data GUI is now blank and unresponsive and I am still unable to get results from my graphql queries - both queries and mutations return null, even though there is test data in the database. Could you tell me if this is a common problem and if it could be region specific. I'm running a POC for what will be a production system, so it would be good to know what I can do to prevent having this issue. Thanks again for your help.

busster commented 3 years ago

Hello @Bartman250 Would you be able to provide screenshots of this issue so I can take a look?

Bartman250 commented 3 years ago

@busster Thanks for coming back. The data tab on the admin UI is just blank.

Also, my queries using the graphql api are returning nulls for example:

image

I can see that all the apl schema and resolvers (velocity templates) were generated. But feels like there is a step missing to make the final connection,

busster commented 3 years ago

@Bartman250 Can you provide some screenshots of the UI and of the Console?

Bartman250 commented 3 years ago

Hello @busster

This is the home page of the admin UI for the app - dg24riwqqhzih

image

Apologies for this, its not a very exciting screen shot - you can't navigate back to the admin ui from here This is the data model:

image

This is the graphql view

image

zakwear commented 3 years ago

I also get a blank page when clicking View Data Model. I tried recreating the app several times with Amplify CLI. Here's what I get in console for the blank page:

amplifyadminconsole

All I did was follow the quick start instructions from the folks at Chime, and then tried to use the amplify admin UI to activate DataStore management. Blank page.

Project ID: d3i50rqdctjcv9

Since going to DataStore, the test app broke and won't render.

I'm going to reattempt this without creating the Lambda function or GraphQL API in the Chime quickstart. I'll push/publish, enable DataStore in admin ui, then create the Lambda and API for Chime on the admin ui.

Edit: Had to fix the image.

cslogan-red commented 3 years ago

@Bartman250 Unfortunately DataStore does not currently support Aurora as a data source even though its possible to enable this source for your GQL API. At present, AdminUI does not detect the source of your GQL API is Aurora and so it does not prevent you from enabling DataStore; however, because the AdminUI Content CMS is built in tandem with DataStore, it will not work with your Aurora based GQL API. We have this in our backlog (as does the DataStore team) to support in the future.

Bartman250 commented 3 years ago

@cslogan-red Thanks for letting me know. Can I assume that this is only an admin UI issue and that the blog do to this is still valid: https://docs.amplify.aws/cli/graphql-transformer/relational/ (I still have issues getting this working BTW - not quite sure which team I should raise it with.

In the end I opted for doing this with Lambda, this is a great blog: https://aws.amazon.com/blogs/mobile/building-real-time-serverless-apis-with-postgres-cdk-typescript-and-aws-appsync/

Thanks again for looking into this! 👍

stevegroom commented 2 years ago

Same issue yesterday. I created a new amplify app and deployed the model with four simple related tables ( Season > Event > Session > Decision ) one-to-many relations. The deploy hung. Eventually I reloaded the screen and it stated that the deploy was successful - not convinced though... AppId d3do0asfx9gyhm