Ecto.Repo.insert! compatibility issue as of ash v2.5.10

I noticed some of my tests failing after upgrading to the latest ash, relating to the work recently done to add relationships to the underlying ecto schemas. Please see https://github.com/ahey/ash_postgres/commit/acc947292d2aa1e4a9ffccaf4d63069cf6c82a90 for details and a test case.
GitHub
Add failing test for inserting via Ecto.Repo.insert! Ā· ahey/ash_pos...
It should be possible to use this function, and it did work as of ash v2.5.9. This test fails as of ash v2.5.10, which introduced adding relationships to underlying ecto schemas. The bug is related...
9 Replies
ZachDaniel
ZachDaniel•3y ago
@Alan Heywood have you tried the release I just pushed up? It may have resolved the issue.
Alan Heywood
Alan HeywoodOP•3y ago
Do you mean ash 2.5.12?
ZachDaniel
ZachDaniel•3y ago
ah, no latest of ash_postgres You'll want to be on the latest of both ash and ash_postgres
Alan Heywood
Alan HeywoodOP•3y ago
Yes, this issue is present on latest ash_postgres main branch, and latest ash.
ZachDaniel
ZachDaniel•3y ago
šŸ¤” okay will take a look šŸ¤” this is tough
Alan Heywood
Alan HeywoodOP•3y ago
It's not a show-stopper for me, I can just as easily not use that function, and use the ash way of inserting. I was only using it for simple factories in my unit tests.
ZachDaniel
ZachDaniel•3y ago
Yeah, so a new feature we added for ecto compatibility may have broken that part of ecto compatibility 😢 I might be able to fix it though Hey @Alan Heywood , mind trying main?
Alan Heywood
Alan HeywoodOP•3y ago
That has resolved it, and all my tests are passing. Thanks!
ZachDaniel
ZachDaniel•3y ago
🄳 I will push a release when I get a chance

Did you find this page helpful?