amplify-category-api
amplify-category-api copied to clipboard
Circular Dependency Issue in our Amplify CI/CD pipeline
Amplify CLI Version
10.5.0
Question
Hello!
I am running into a circular dependency issue in our Amplify CI/CD pipeline when attempting to push the following schema changes
type Service @model {
id: ID!
ownerID: ID
owner: Owner @hasOne(fields: ["personID"])
}
type Car @model {
owners: [Owner!] @hasMany(indexName: "byCar", fields: ["id])
}
type Owner @model {
id: ID!
carID: ID! @index(name: "byCar")
car: Car! @belongsTo(fields: ["carID"])
}
Error:
UPDATE_FAILED apiwww AWS::CloudFormation::Stack Tue Dec 13 2022 02:22:36 GMT+0000
(Coordinated Universal Time) Circular dependency between resources: [Service, Car, SearchableStack, Owner, ConnectionStack, CustomResourcesjson ...]
This doesn't happen in my developer environment when I do amplify push -y, however, it keeps failing in our CI/CD pipeline. I noticed that the amplifyPush --simple script has been deprecated - could this issue be caused by that change?
We do have other models in the schema with similar dependencies that were introduced earlier this year and that doesn't seem to have any problems building out in the pipeline.