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

renaming model causes build failure which causes Data manager to fail #974

Closed
4 tasks done
ykethan opened this issue Jun 9, 2023 · 2 comments
Closed
4 tasks done
Labels
bug An issue which has been identified as a bug cms An issue identified as a cms bug/feature deployment studio-ui An issue that needs to be tracked by Studio Console team

Comments

@ykethan
Copy link
Member

ykethan commented Jun 9, 2023

Before opening, please confirm:

App Id

du64f5tz2v3sc

Region

us-east-1

Environment name

dev

Figma File Version (if applicable)

No response

Amplify CLI Version

No response

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

No response

What operating system are you using?

No response

Browser type?

No response

Describe the bug

When renaming a model say from Events to Event and deploy the model. The deployment fails with error

Only one resolver is allowed per field.

When going back to Data manager and creating a record causes the record to stay in a never ending sync status

workaround: remove data model, deploy and re-add the data model and deploy. not ideal for production envs.

Expected behavior

dont cause the data manager fails if deployment rolls back

Reproduction steps

  1. Create a Model Events as follows
enum EnumCountry {
  INDIA
  AUSTRALIA
  CANADA
  USA
  UK
}

type Events @model @auth(rules: [{allow: public}]) {
  id: ID!
  country: EnumCountry!
  city: String!
  venue: String!
  address1: String!
  addess2: String
  time: String!
  startDate: String!
  endDate: String!
  phone: String
}
  1. rename model from Events to Event
  2. see deployment fail
  3. go to data manager
  4. create a record and observe a never ending sync issue

Project Identifier

No response

Additional information

No response

@ykethan ykethan added pending-triage An issue that is pending triage bug An issue which has been identified as a bug cms An issue identified as a cms bug/feature studio-ui An issue that needs to be tracked by Studio Console team deployment and removed pending-triage An issue that is pending triage labels Jun 9, 2023
@ykethan
Copy link
Member Author

ykethan commented Sep 25, 2023

Closing the issue, the API deploy should throw error when renaming the data model.
An error occurred while processing your request: Cannot use model name "Event" due to conflict with the existing API resource.

@ykethan ykethan closed this as completed Sep 25, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue which has been identified as a bug cms An issue identified as a cms bug/feature deployment studio-ui An issue that needs to be tracked by Studio Console team
Projects
None yet
Development

No branches or pull requests

1 participant