Closed smt116 closed 2 months ago
I fixed a bug remarkably similar to this in ash core recently. Just want to double check that latest of ash, ash_graphql, and ash_state_machine don't resolve the issue.
The issue exists on the latest branches of these packages. Tested via:
# Ash Framework and its dependencies
{:ash,
github: "ash-project/ash", sha: "3c2f51224a767b6487decd538af1e0299096dcac", override: true},
{:ash_appsignal, "~> 0.1.3"},
{:ash_authentication_phoenix, "~> 2.0.0"},
{:ash_authentication, "~> 4.0.0"},
{:ash_graphql,
github: "ash-project/ash_graphql", sha: "3e5cf20023f3990aff2d66c7307e3479d2a357ad"},
{:ash_oban, "0.2.3"},
{:ash_phoenix, "~> 2.0.2"},
{:ash_postgres, "~> 2.0.8"},
{:ash_state_machine,
github: "ash-project/ash_state_machine", sha: "4549fb277d992134fc7f6de4bac359b88476e667"},
{:picosat_elixir, "~> 0.2"},
I'll have to get a reproduction set up. Hopefully within the next few days. Is something that is being called in the after_action
hook raising an error or rolling back the transaction? Will need to narrow down the likely causes to reproduce it.
I've removed everything and tried again with 3.2.6 and latest branches and seems to be working now. I have no idea what get changed but seems to be resolved now.
There is a potential regression between Ash
04707aafd74fe3c5439d642578bce0817fda5ced
and81842a319aa18e974c9e87905c2a30b42e5084f10bf2931a6709e26398eeb5a6
or Ash Graphql between8d612a08bc8956e350d0cc579a8be476d1b0ba74
and5d784606582c0bcf36570bc9245a9db8524415d2a48a92c075e306475f2eba7f
.I have an action that suppose to validate the state of a record:
That action is exposed via GQL API. After upgrading those two packages, I see that a test is faling now because relevant GQL mutation returns "something went wrong" instead of "invalid attribute".
Note that I have other actions that rely on Ash State Machine and these validates the state correctly - it returns a correct error if the state validation fails.
Here are logs from the action execution: