Skip to content
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

Deploy failed if created 190 data modeling at local #2145

Closed
1 task done
KevinLam0308 opened this issue Nov 30, 2022 · 10 comments
Closed
1 task done

Deploy failed if created 190 data modeling at local #2145

KevinLam0308 opened this issue Nov 30, 2022 · 10 comments
Labels
bug Something isn't working GraphQL API Related to the API (GraphQL) category/plugins

Comments

@KevinLam0308
Copy link

Before opening, please confirm:

Language and Async Model

Java

Amplify Categories

GraphQL API

Gradle script dependencies

// Put output below this line

    implementation 'com.amplifyframework:core:1.37.6'
    implementation 'com.amplifyframework:aws-api:1.37.6'

Environment information

# Put output below this line


------------------------------------------------------------
Gradle 5.1.1
------------------------------------------------------------

Build time:   2019-01-10 23:05:02 UTC
Revision:     3c9abb645fb83932c44e8610642393ad62116807

Kotlin DSL:   1.1.1
Kotlin:       1.3.11
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          13.0.2 (Oracle Corporation 13.0.2+8)
OS:           Windows 10 10.0 amd64

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

Hello,

I would like to create more than 600 data modeling on amplify console, in order to reduce the development time, I do this in local by following steps:

  1. Build a new app on Amplify Console
  2. Create 1 data modeling first, then "amplify pull" to my Android project
  3. Add 599 data modeling in schema.graphql
  4. Then, amplify push

I got deploy fail error during deploying, then I reduce the size of data modeling to 190 but still no luck.

Questions:

  1. How can I deploy the data modeling without error?
  2. Is there any limitation of the data modeling size?
  3. Is that limited by Amazon DynamoDB service quotas? If so, data modeling can be used up to 2500?

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


amplifyconfiguration.json

No response

GraphQL Schema

// Put your schema below this line

report-1669771429903.zip

Additional information and screenshots

No response

@AnilMaktala AnilMaktala added the pending-triage Issue is pending triage label Nov 30, 2022
@awsmobilesdk awsmobilesdk added GraphQL API Related to the API (GraphQL) category/plugins bug Something isn't working and removed pending-triage Issue is pending triage labels Nov 30, 2022
@banji180
Copy link
Contributor

We are currently looking into it and will keep you updated. In the meantime, can you help with the following questions:

  1. Are you getting the error when you run amplify push command?
  2. Can you share the error log?

@KevinLam0308
Copy link
Author

1.yes, I am getting the error when run amplify push command
2. I attached the error report and put at GraphQL schema, is that zip file included the error log? if not, I will get it for you afterwards, thanks.

@banji180
Copy link
Contributor

I don't think the error report is attached. Let me see if I'm able to reproduce it while I await your log file.

@KevinLam0308
Copy link
Author

Hi Banji180,

attached the error report, thanks.

report-1669771429903.zip

@KevinLam0308
Copy link
Author

Hi @banji180

I tested out the limitation (without deploy fail error) for the previous schema with below data struct, max can deploy 144 data model!

id: ID!
date: String
time: String
count: Int
checksum: String

but after changing to new schema (attached here) which has more data field, the max data model is not 144 anymore, I am still testing the limitation, will the number of data field affect the number of data model? Please advise, thanks!

report-1669882664397.zip

@KevinLam0308
Copy link
Author

KevinLam0308 commented Dec 2, 2022

Hi @banji180

I tried to use below command to deploy again, but still fail to deploy.

amplify push --allow-destructive-graphql-schema-updates

amplify push --force

Look forward to having your feedback, otherwise I am not able to move on, thanks!

report-1669960212078.zip

@AnilMaktala
Copy link
Member

Hi @KevinLam0308, Default Appsync subscription limit is 100 per connection. Datastore creates 3 subscriptions for each model so total subscriptions for 190 will be 190*3= 570. You can refer to the default limits here and you may request the limit increase here.

@AnilMaktala AnilMaktala added the pending-community-response Issue is pending response from the issue requestor label Dec 7, 2022
@KevinLam0308
Copy link
Author

Hi @AnilMaktala, thanks for the reply.

I am so confusing for the subscription limit. Now, I modified the schema from 190 models down to 88 in my Android studio project, total subscriptions for 88 is 264, in this case, I can deploy to server successfully. So why the 100 per connection seems not affecting to 264 subscriptions or it has another meaning?

**another questions:

After deploying 88 models to server successfully then I add "Subscription" in the schema then deploy again,

but it failed (attached the error report):
report-1670832854054.zip

Does this error caused by other Service Quota that I've already exceeded the limit? Please advise. Thanks.

@AnilMaktala AnilMaktala added pending-triage Issue is pending triage and removed pending-community-response Issue is pending response from the issue requestor labels Jan 18, 2023
@eeatonaws eeatonaws removed the pending-triage Issue is pending triage label Apr 19, 2023
@lawmicha
Copy link
Member

lawmicha commented Jul 2, 2024

Hi @KevinLam0308,I suspect there might be a maximum number of @model types you can define in your schema. From your attached report, it looks like the data model fields are repeated. By repeating the model types, you won't actually be creating instances of them. Instead, you can define a single model type and create multiple instances using the model name as a field in the model itself.

For example, instead of defining:

type M20432052P @model @auth(rules: [{allow: public}]) {
  id: ID!
  userId: String
  groupId: String
  trackId: String
  createdTime: String
  latitude: Float
  longitude: Float
  accuracy: Float
  batteryLevel: Int
  sosStatus: Int
  pointCnt: Int
  deviceMAC: String
  otherInfo: String
  dataStatus: Int
  checksum: String
}

You can define one model type called:

type User @model @auth(rules: [{allow: public}]) {
  id: ID!
  userId: String
  groupId: String
  trackId: String
  createdTime: String
  latitude: Float
  longitude: Float
  accuracy: Float
  batteryLevel: Int
  sosStatus: Int
  pointCnt: Int
  deviceMAC: String
  otherInfo: String
  dataStatus: Int
  checksum: String
}

Later in your code, you can instantiate a model with id equal to "M20432052P". You can also add a new field called modelName within the User model type and set that.

Please reach out again if you require further assistance

@lawmicha lawmicha closed this as completed Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GraphQL API Related to the API (GraphQL) category/plugins
Projects
None yet
Development

No branches or pull requests

6 participants