8000 Failing `next.jdbc` instrumentation during `conn/do-with-transaction` call · Issue #199 · camsaul/toucan2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Failing next.jdbc instrumentation during conn/do-with-transaction call #199

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

Open
marksto opened this issue Mar 4, 2025 · 0 comments
Open

Comments

@marksto
Copy link
marksto commented Mar 4, 2025

Hi! I'm half way through the migration from Toucan 1, and everything works fine so far. Still, I am yet to migrate from the toucan2-toucan1 lib. And it seems like this may be causing the issue.

If I enable the next.jdbc instrumentation in REPL via (next.jdbc.specs/instrument), then the next.jdbc/with-transaction call that's made in the toucan2.jdbc.connection ns's conn/do-with-transaction method fails with the following error in logs:

Root: clojure.lang.ExceptionInfo - Call to next.jdbc/transact did not conform to spec.
data: {:clojure.spec.alpha/problems ({:path [:opts], :pred clojure.core/map?, :val nil, :via [:next.jdbc.specs/opts-map :next.jdbc.specs/opts-map], :in [2]}) ...

So, basically, next.jdbc/transact does not expect you to pass nil opts, which is odd, I agree, since its with-transaction wrapper macro defaults them with ~(or opts {}) anyway prior to calling the next.jdbc/transact.

As I didn't finish my migration to Toucan 2 yet, I only may guess atm if the root cause of this one is in toucan2-toucan1, or in toucan2, or in the next.jdbc itself (maybe the specs are out of sync?). So filing this issue here for now.

Cheers,
Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0