rover icon indicating copy to clipboard operation
rover copied to clipboard

Unexpected `_entities[0]/submitCheckSchemaAsync` error on large schema check

Open davola opened this issue 2 years ago • 4 comments

Description

After updating Rover from version v0.7.0 to any newer version, we staretd having an undocumented error when trying to perform the graph check process.

The error itself is as follows:

.error: Exception while fetching data (/_entities[0]/submitCheckSchemaAsync) : Error submitting schema check request

Steps to reproduce

This happends when runing the schema check jobs we have set our github workflows.

The steps we go trhough the actions are the following:

  • Install any rover version higher than v0.7.0 (actually latest is v0.9.1)
  • We run a schema export from our Craft CMS docker instance
  • We use the exported schema on the Rover CLI check as follow
rover graph check SomeProject@someVersion --schema schema.exported.from.previous.step.graphql
  • we get the following error
.error: Exception while fetching data (/_entities[0]/submitCheckSchemaAsync) : Error submitting schema check request

Note:

If we use the publish commnad, we can export the generated schema with no trouble. Another thing to notice is the resulting schema is I believe very large. (5.3 MB)

Expected result

A valid schema check report wether it has found changes or not.

Actual result

We get the error described above. No schema check is performed.

Environment

Rover Info: Version: 0.9.1 Install Location: /home/runner/.rover/bin/rover OS: Ubuntu 20.04 (focal) [64-bit] Shell: Unknown

davola avatar Oct 19 '22 20:10 davola

I'm getting the same error. However the error message is different in version v0.7.0 error: Unexpected error during schema check. Please try again or contact Apollo support

v0.8.0 and up I get error: Exception while fetching data (/_entities[0]/submitCheckSchemaAsync) : Error submitting schema check request

When going back and forth in our git commits i found a commit where this started happening. Playing around with the code it didn't seem to have anything to do with the what was in the schema but the size itself. Our schema is also very large.

This seem to occur around 3.7 MB.

A 3 765 124 bytes schema does not work A 3 750 011 bytes schema does work

mikaelmattsson avatar Mar 16 '23 15:03 mikaelmattsson

Hi @mikaelmattsson, long time has pass by since we opnened this bug fix request, and haven't had any response from Apollo yet. But yes, as you have discovered, this is a size problem. In our project. we have avoided this issue by removing all the not critical schema comments our CMS (craft-cms) was generating, therefor we managed to lower the size from 5.3 MB to 2.5 MB and it works now. As per your testings seems you have found the MB limit to be something near 3.7 MB. 😅 Let's hope apollo's team can give us some response or solution to this size issue anytime in the future 💪

davola avatar Mar 16 '23 16:03 davola

The response I've gotten from Apollo is that they're adding size-limit warnings (at 1Mb and 3Mb), but their recommendation was to reduce the size of the schema, which unfortunately does not address this issue.

mondash avatar Mar 16 '23 16:03 mondash

Do you have some nice regex replace that I can run in a pipeline to remove comments? 😅

Edit: Never mind, i added gqlmin to minify the schema and that works to lower the size but with our current model it is still not near small enough. neo4j-graphql that we use generates a lot of stuff in the schema and that was increased in a new version so now our schema file is 5.4 MB and if I use gqlmin i get it down to 4.8 MB.

mikaelmattsson avatar Mar 17 '23 07:03 mikaelmattsson