feat: fix EctoAdapter transaction compatibility with Ecto.Adapters.SQL.Sandbox - #44
Conversation
|
|
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
…tion usage Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
|
@copilot Fix failed CI check: |
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
... Fixed in commit 552788d. Ran Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot fix failed compile error: |
…name) Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
... Fixed in commit 7809be8. Changed all Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
# [1.6.0](v1.5.0...v1.6.0) (2025-11-09) ### Features * fix EctoAdapter transaction compatibility with Ecto.Adapters.SQL.Sandbox ([#44](#44)) ([faac648](faac648))
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.6.0](v1.5.0...v1.6.0) (2025-11-09) ### Features * fix EctoAdapter transaction compatibility with Ecto.Adapters.SQL.Sandbox ([#44](#44)) ([d827793](d827793))
Fix EctoAdapter to work with Ecto.Adapters.SQL.Sandbox in nested transactions
Problem Summary
The EctoAdapter fails when used within Repo.transaction blocks in tests using SQL.Sandbox because:
Sandbox.allow/3, the EnforcerServer cannot access a connection locked by another process's transactionSolution Implemented ✅
Code Changes
get_dynamic_repofield to EctoAdapter structget_repo/1helper for runtime repo determinationget_repo/1Acx.Persist.EctoAdapter.get_repo/1Documentation Created
How Users Should Use This ✅
The recommended solution follows Ecto's official best practices:
Fixes #43
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.