Implement `debugPanic` like functionality for `getConfig` and `getDmmf` of Query Engine
See original GitHub issueTo be able to implement and test Prisma’s CLI engine crash reporting for getConfig
and getDmmf
, we need new functionality similar to debugPanic
of Migration and Introspection Engines (https://prisma.github.io/prisma-engines/doc/migration_core/json_rpc/index.html#-debugpanic) that we can somehow trigger when we execute getConfig
or getDmmf
.
For getConfig
we call in the CLI:
- For the Node-API library
NodeAPIQueryEngineLibrary.getConfig(...)
- For the Binary
...engineArgs, 'cli', 'get-config', ...args
For getDmmf
we call in the CLI:
- For the Node-API library
NodeAPIQueryEngineLibrary.dmmf(datamodel)
- For the Binary
'--enable-raw-queries', 'cli', 'dmmf'
For all 4 we have 2 different options how to implement this:
- We implement a separate function/endpoint
debugPanic
that we can call instead of the intended function/endpoint, and when we want to test the error reporting we would just call out to that instead of the actual one. - We use the existing function/endpoint but add a way to configure what happens inside (and then trigger the panic there). For Node-API library that could maybe be an environment variable, and for the Binary an additional parameter.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Prisma 3.14.0 Release - GitClear
ci(update-engines-version): Output Prisma-Engines commit hash with ... Implement debugPanic like functionality for getConfig and getDmmf of ...
Read more >Query engine (Concepts) - Prisma
The query engine receives the SQL response from the database; The query engine returns the result as plain old JavaScript objects to Prisma...
Read more >Amazon Athena announces upgraded query engine
Amazon Athena has upgraded its SQL query engine to include the latest features from the Trino open source project. Athena engine version 3 ......
Read more >What is a query engine? | Learn - Alluxio
A distributed SQL query engine will allow you to query data from a variety of data sources like Hadoop, AWS S3, NoSQL, MySQL,...
Read more >Presto: Free, Open-Source SQL Query Engine for any Data
PrestoDB lets you run interactive/ad-hoc SQL queries at sub-second performance. Query data lakes, lakehouses, or databases. Runs reliably at massive scale.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That sounds good. @jkomyno who will use these, just needs to know how to trigger each.
What you describe for Node-API could be related to these issues (and the comments): https://github.com/prisma/prisma/issues/7810 + https://github.com/prisma/prisma/issues/11362
The binary already has a way of triggering errors: Fatal or non-fatal, based on included headers
x-debug-non-fatal
orx-debug-fatal
. Fatal = engine exists, non-fatal: panic is thrown. That’s only possible on the graphql endpoint right now, but not really a problem to expand that to other ones too.The NodeAPI already has a
debug_panic
endpoint that simply errors.Edit: The NodeAPI basically returns a user-facing error, not really panics. We could change that to a true panic, but then the assumption is that there are cases where the panic hooks are not working. The NodeAPI should always hook panics with the handler, but that requires some more investigation.