question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement "CLI engine crash reporting" for Formatter Engine and `getConfig` and `getDmmf` of Query Engine

See original GitHub issue

This relies on https://github.com/prisma/prisma/issues/12493 and https://github.com/prisma/prisma/issues/12494 being implemented. (Done)

We want to implement error reporting similar to how we already have it for Migration and Introspection Engine crashes for the Formatter Engine and QueryEngine (getConfig and getDmmf parts). Via the above mentioned issues the necessary mechanisms in the engines have been implemented, and can now be used here as well.

    • Allow triggering the new debug functionality (implemented via #12493 and #12494) similar to e.g. in Migrations with an environment variable.
    • (Note that we want to be able to trigger getConfig and getDmmf crashes separately, so they need a different “trigger” on the CLI side as they are often called together or close to each other.)
    • If one of the issues is not implemented yet, just fake the code so pretend it was already there - and we can add the actual implementation later.
    • Implement CLI Engine Error handling for all uses of Formatter Engine and QueryEngine (getConfig and getDmmf)
    • Add tests similar to existing IE and ME error triggering to make sure this keeps working

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jkomynocommented, Apr 19, 2022

I have locally added the --enableTriggerPanic flag to the query-engine cli get-config and cli dmmf commands. Here is an example @janpio:

image

image

1reaction
jkomynocommented, Apr 19, 2022

The fancy error reporting (i.e., handlePanic) is only triggered whenever an error with a rustStack property is bubbled up in the cli. Locally, I have propagated the errors for getConfig and dmmf whenever either the FORCE_PANIC_QUERY_ENGINE_GET_CONFIG=1 or the FORCE_PANIC_QUERY_ENGINE_GET_DMMF=1 env variables are set. However, I still have to capture the Rust’s stacktrace and embed them in an Error the way @prisma/cli wants it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma 3.15.0 Release - GitClear
You can use metrics in your project to help diagnose how your application's number of idle and active connections changes with counters, gauges, ......
Read more >
Monitoring the System Using the CLI
This chapter describes the CLI commands you can use to monitor the 5800 system. ... Query Engine Status reports the states of the...
Read more >
prisma - npm
4.6.0-integration-engines-4-6-0-10-query-engine-mongo-logging-fix- ... 4.3.0-integration-use-prisma-fmt-wasm-for-cli-format.13.
Read more >
@prisma/generator-helper: Versions | Openbase
To access the schema property, you can use the getDmmf() method from ... Implement "CLI engine crash reporting" for Formatter Engine and getConfig...
Read more >
Command line interface — Trino 403 Documentation
Installation# · java command allows you to add configuration options for the Java runtime with the · -D syntax. You can use this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found