After a couple hours of try-and-error, somehow, I managed to get it "fixed" locally by adding this:
# PartitionDispatcher at line 88
def handle_info({_from, :ok}, %S{timeout: timeout} = state) do
{:noreply, state, timeout}
end
I'm not sure of what I did there -- brain fried after debugging most the code base kkkry --, I just copied and past a bunch of things till get that working.
Failure was triggered when awaiting an event inside a service (weird thing is that we didn't catch that error before)
# Hatch.Invoice.Service
def handle_event(%TimeEntryCreated{} = e) do
# commenting out this `await_processed/2` is enough to not get the error on derive but,
# of course, the service will fail if the time entry doesn't exist in the db yet.
await_processed([e], :reducers)
with_time_entry(e.time_entry_id, &maybe_create_invoice_line_item/1)
end
Edit: ok, maybe that wasn't a "fix" cuz now I'm getting theses errors all over the place (although for some coincidence most tests are passing)
02:27:33.012 [error] GenServer :"Elixir.Hatch.Contracts.Service.source" terminating
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Turtle.EventLog.handle_cast/2
(turtle 0.0.1) lib/event_log.ex:102: anonymous fn(nil) in Turtle.EventLog.handle_cast/2
(elixir 1.13.4) lib/enum.ex:4034: Enum.filter_list/2
(turtle 0.0.1) lib/event_log.ex:102: Turtle.EventLog.handle_cast/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:new_events, [nil, nil]}}
# seems to repeat for all domains' service/reducer
The tests that seems to produce the most amount of errors is api/test/features/hatch__invoices_test.exs, at scenario "Invoices Only seller-admin in a contract can issue invoice".
After a couple hours of try-and-error, somehow, I managed to get it "fixed" locally by adding this:
I'm not sure of what I did there -- brain fried after debugging most the code base kkkry --, I just copied and past a bunch of things till get that working.
Failure was triggered when awaiting an event inside a service (weird thing is that we didn't catch that error before)
Edit: ok, maybe that wasn't a "fix" cuz now I'm getting theses errors all over the place (although for some coincidence most tests are passing)
The tests that seems to produce the most amount of errors is
api/test/features/hatch__invoices_test.exs
, at scenario "Invoices Only seller-admin in a contract can issue invoice".