-
Notifications
You must be signed in to change notification settings - Fork 79
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
DataStore does not support 1 to 1 connection with both sides of connection as optional field #1419
Comments
Hi, could you kindly update us on the current status of this issue? Our production system is directly affected, and it's causing some roadblocks in our development process. Any information would be greatly appreciated. |
Employing package version overrides within the Amplify Console build settings to revert to an older Amplify CLI version (10.5.2) effectively addressed our issue as an interim solution. |
Also jumping in with our experiences with this -- we've had this issue on our production build systems - an app made long ago with amplify. Experienced this regression twice with different Once with CLI v11.0.4 which was subsequently pulled as a bad release -- maybe there's a related problem here, which shows other issues relating to the broken 11.0.4 build: After that release got pulled, CLI v11.0.5 worked for us, now in the latest version v11.1.1 we're seeing this issue again I suspect this regression was introduced in the 11.0.4 build, and some spin on that broken code has been rereleased since v11.0.5 - causing this issue. Solution: Change Build Settings -> Amplify CLI Version -> v11.0.5 which was the last working version |
Hi @parvusville 👋 sorry for the delay. We've been trying to reproduce the error message you're running into and so far we've run into the issue of deploying non-model type with auth directives. Did you eventually add the model to all of your types to get past these errors? @jvanoers can you run |
Hello @chrisbonifacio . Yes, the DataStore error mentioned in the post was the last error left. I ended up changing |
Are there any recent updates on this issue? I need the latest Amplify CLI version which leads to this issue in our project. |
We're still stuck on 10.8.1 , still waiting for this to be fixed. |
Hi @parvusville, I've root caused the error to be originating from connection validations in modelgen plugin. However since you mentioned you don't use DataStore in your project, I am not sure why the models generation is invoked in the first place. Can you confirm a couple of things:
|
Hello @phani-srikar . |
@phani-srikar we don't have a The call to the code to which you referred seems to have been introduced to @aws-amplify/cli in the v11.0.0 release, via amplify-codegen PR 476, which tallies with the behaviour we've seen across the versions (and explains why we are STILL stuck on @aws-amplify/cli v10.8.1 , which is now 12 months old). Are there any plans at all to address this? |
hello? Still getting this error on |
We are also experiencing this issue, any updates on resolving this? Or is there anyway to disable the codegen running or data store for an amplify gen 1 project.? |
@cunneen not sure if this will help you, but we are not using data store and got a workaround for this by creating a copy of the amplifyPush.sh script in the root directory and removing the codegen related lines (--codegen ${CODEGEN}) from the script. Then we modified our build spec to do the following two lines and we are able to use the latest version of amplify CLI.
|
CLI v12.13.0 has been released with the fix for this. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.21.3
Amplify CLI Version
11.0.5
What operating system are you using?
Pop Os
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no.
Describe the bug
Our CI/CD fails with message
DataStore does not support 1 to 1 connection with both sides of connection as optional field: AdditionalServicePricing.pricing
. I have seen this error before too in CI/CD, but that time I also had a issue with package-lock and package.json being in desync, and after fixing that issue this Datastore message also stopped appearing. This message appears also if I run amplify codegen models. We don't use DataStore in this project.We had many other issues affecting CI/CD, and after fixing them this error started to appear. We are using Transformer V1.
Looking at our build history, these have been failure reasons since the first error to now:
Below is the GraphQL schema. If I make
AdditionalServicePricing
pricing
field non-mandatory, build in CI/CD goes through fine. Why does this happen, and why does this error start to show up seemingly out of nowhere? Also local amplify push goes through just fine also with pricing set to mandatory.Expected behavior
The build should succeed with the same schema it has succeeded previously with. Or if it should not, why it has succeeded until now?
Reproduction steps
Project Identifier
f59e77335650fce92677ec2970143a9b
Log output
Additional information
CICD goes fine, if I make the @connection field in question optional.
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: