Closed bergmorten closed 2 years ago
Downgrading the amplify cli to prevous version seems to fix the problem.
npm remove -g @aws-amplify/cli
npm i -g @aws-amplify/cli@7.6.25
amplify api gql-compile --debug
(node:1524) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\MortenBerg\AppData\Roaming\npm\node_modules\@aws-amplify\cli\node_modules\cloudform\package.json' of 'packages/cloudform/index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
GraphQL schema compiled successfully.
I'm currently attempting to reproduce this issue - can you tell me which version of the CLI you were on before using 7.6.26? I created a @manyToMany
relation on 7.6.24, pushed, upgrades to 7.6.26 and tried to run amplify api gql-compile
but successfully completed without errors
I think my previous version also was 7.6.24, but do you have more than one manytomany connections?
Could it be that my cli.json has outdated settings, see my current setup below? This was the case with another bug.
{
"features": {
"graphqltransformer": {
"addmissingownerfields": false,
"improvepluralization": false,
"validatetypenamereservedwords": true,
"useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": false,
"secondarykeyasgsi": false,
"skipoverridemutationinputtypes": false,
"transformerversion": 2,
"suppressschemamigrationprompt": true,
"securityEnhancementNotification": false,
"showfieldauthnotification": false
},
"frontend-ios": {
"enablexcodeintegration": false
},
"auth": {
"enablecaseinsensitivity": false,
"useinclusiveterminology": false,
"breakcirculardependency": false,
"forcealiasattributes": false,
"useenabledmfas": false
},
"codegen": {
"useappsyncmodelgenplugin": true,
"usedocsgeneratorplugin": true,
"usetypesgeneratorplugin": true,
"cleangeneratedmodelsdirectory": true,
"retaincasestyle": true,
"addtimestampfields": true,
"handlelistnullabilitytransparently": true,
"emitauthprovider": false,
"generateindexrules": false,
"enabledartnullsafety": false
},
"appsync": {
"generategraphqlpermissions": false
},
"latestregionsupport": {
"pinpoint": 0,
"translate": 0,
"transcribe": 0,
"rekognition": 0,
"textract": 0,
"comprehend": 0
},
"project": {
"overrides": true
}
}
}
@marcvberg We're seeing this too on 7.6.26 - Confirmed previous working version was 7.6.25.
Here's the first CloudFormation error that shows up in the build log:
UPDATE_FAILED SermonTagTable AWS::DynamoDB::Table Wed Mar 23 2022 16:48:39 GMT+0000 (Coordinated Universal Time) Cannot update GSI's properties other than Provisioned Throughput and Contributor Insights Specification. You can create a new GSI with a different name.
And, here's the relevant excerpt of our schema.graphql
(which hasn't changed recently):
type Sermon
@model
@auth(rules: [{ allow: owner }]) {
id: ID!
resourceId: String
legacyId: String
seriesId: ID @index(name: "bySeries")
title: String!
referenceVerses: String
bigIdea: String
blocks: AWSJSON
isArchived: Boolean
deletedAt: AWSDateTime
sermonType: SermonType!
description: String
wordCount: Int
owner: String @index(name: "byOwner")
tags: [Tag] @manyToMany(relationName: "SermonTag")
}
type Tag
@model
@auth(rules: [{ allow: owner }]) {
id: ID!
title: String!
sermons: [Sermon] @manyToMany(relationName: "SermonTag")
}
Confirmed that pinning our amplify-cli version to 7.6.25
brings us back to green builds.
My project uses "graphqltransformer"/"secondarykeyasgsi" set to true, as that's the default now. If you set that value to true does this issue persist?
Yes, we tried that, and still have the same issue.
7.6,25 works, so something must have changed in 7.6.26 regarding manytomany relationships.
On Thu, Mar 24, 2022 at 2:34 PM Marc VandenBerg @.***> wrote:
My project uses "graphqltransformer"/"secondarykeyasgsi" set to true, as that's the default now. If you set that value to true does this issue persist?
— Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-cli/issues/10051#issuecomment-1077634293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUXMIRLEHBAKO7577FW6F5DVBRVNZANCNFSM5RNS3IRQ . You are receiving this because you authored the thread.Message ID: @.***>
Hey @bergmorten :wave: unfortunately we have not been successful in reproducing this issue and have a few follow-up questions:
amplify api gql-compile
or on amplify push
I can confirm that the issue has been fixed in version 8.0.3 (not tested the previous ones).
Hey @bergmorten glad to hear you're back up and running! I have noted this issue as a point of reference when addressing push failures related to GraphQL API's, however for now I will close this issue. If this occurs again please do not hesitate to reply back to this thread and we can re-open to investigate further 🙂
I am experiencing the "Attempting to edit the global secondary index [GSI name] on the [DDB table anem]Table table in the [stack name] stack." error with Amplify CLI v.10.4.1 - current latest - and a few other recent versions, when I do "amplify push
". Running on Windows and having the same issue on two different systems.
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
7.6.26
What operating system are you using?
windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
None changes
Amplify Categories
api
Amplify Commands
publish
Describe the bug
We have not changed the graphQL scheme or any manually aws commands. The last build succeeded yesterday 22 march @ 17:30, but today build does not succeeds when pushing a simple web-code update that is not related to graphql scheme.
Trying to compile the graphQL localy complains with the same error: An illegal update of secondary keys. However this is a internal table generated by a @manyToMany relationship.
amplify push
says that are no changes (and do nothing), but pushing code to Git that trigger backend build fails or locally tryingamplify api gql-compile
fails.Expected behavior
Amplify CI and
amplify api gql-compile
should work when no changes are made to graphQL schemeReproduction steps
amplify api gql-compile
GraphQL schema(s)
Log output
Additional information
No response