evadne/etso

Issue after updating Ecto to version 3.8.0

ivanpetrovic opened this issue · 1 comments

Hi,

I am using the Logflare_logger_backend which itself is using Etso for batching log events.

After Ecto was updated to version 3.8.0 Etso started throwing this error:

 ** (UndefinedFunctionError) function Etso.Adapter.Meta.fetch/2 is undefined (Etso.Adapter.Meta does not implement the Access behaviour)
        (etso 0.1.6) Etso.Adapter.Meta.fetch(%{__struct__: Etso.Adapter.Meta, adapter: Etso.Adapter, cache: #Reference<0.2578754468.1338638337.64788>, pid: #PID<0.3611.0>, repo: LogflareLogger.Repo}, :stacktrace)
        (elixir 1.13.3) lib/access.ex:285: Access.get/3
        (ecto 3.8.0) lib/ecto/repo/supervisor.ex:161: Ecto.Repo.Supervisor.tuplet/2
        (logflare_logger_backend 0.11.0) lib/repo.ex:2: LogflareLogger.Repo.all/2
        (logflare_logger_backend 0.11.0) lib/logflare_logger/batch_cache.ex:103: LogflareLogger.BatchCache.events_in_flight/0
        (logflare_logger_backend 0.11.0) lib/logflare_logger/http_backend.ex:56: LogflareLogger.HttpBackend.handle_info/2
        (stdlib 3.15) gen_event.erl:627: :gen_event.server_update/4
        (stdlib 3.15) gen_event.erl:609: :gen_event.server_notify/4
        (stdlib 3.15) gen_event.erl:398: :gen_event.handle_msg/6
        (stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

Ecto 3.7.2 is the last version not creating this issue.

The issue is fixed in Ecto main/master.
elixir-ecto/ecto#3894