-
Notifications
You must be signed in to change notification settings - Fork 249
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
driver-adapters: Ensure error propogation works for startTransaction
#4267
Conversation
`startTransaction` was not correctly wrapped when converting `Adapter` to `ErrorCapturingAdapter`. As a result, `GenericError` message was returned in case of JS error. This PR fixes the problem. Since it is hard to test those kinds of errors with real drivers, new test suite for the error propogation is introduced. It uses fake postgres adapter that throws on every call.
startTransaction
startTransaction
CodSpeed Performance ReportMerging #4267 will degrade performances by 5.51%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
} | ||
} | ||
}) | ||
const resultSet = await this.doQuery({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO in a separate PR: remove this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix and for adding the tests. Changes look correct.
Now I have a more general question.
Should we keep the smoke tests in the light of the query-engine test suite exercising each of the adapters? I think we shouldn’t given the coverage from connector-kit-rs using the js executor, and also the presence of tests in prisma/prisma. WDYT?
They are a quick tool to check things when developing a new driver adapter, and to surface very quickly some fundamental problems. (See the msg I just posted in Slack) I would say we keep them, at least for a while (or forever, as the first way to check if a driver adapter is complete). |
startTransaction
was not correctly wrapped when convertingAdapter
to
ErrorCapturingAdapter
. As a result,GenericError
message wasreturned in case of JS error. This PR fixes the problem.
Since it is hard to test those kinds of errors with real drivers, new
test suite for the error propogation is introduced. It uses fake
postgres adapter that throws on every call.