diff --git a/.tool-versions b/.tool-versions index c4e388ee..c34e3c20 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -elixir 1.16.3-otp-25 -erlang 25.3.2.12 +elixir 1.16.3-otp-26 +erlang 26.2.5 python 3.9.16 poetry 1.7.0 diff --git a/Dockerfile b/Dockerfile index ad93458e..9ce39f2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG ELIXIR_VERSION=1.16.3 -ARG ERLANG_VERSION=25.3.2.12 -ARG ALPINE_VERSION=3.17.7 +ARG ERLANG_VERSION=26.2.5 +ARG ALPINE_VERSION=3.20.0 FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_VERSION}-alpine-${ALPINE_VERSION} as builder @@ -28,7 +28,7 @@ RUN mix release # The one the elixir image was built with FROM alpine:${ALPINE_VERSION} -RUN apk add --no-cache libssl1.1 dumb-init libstdc++ libgcc ncurses-libs && \ +RUN apk add --no-cache libcrypto3 dumb-init libstdc++ libgcc ncurses-libs && \ mkdir /work /api && \ adduser -D api && chown api /work diff --git a/apps/api_web/test/api_web/canary_test.exs b/apps/api_web/test/api_web/canary_test.exs index d29b268d..a95bc74d 100644 --- a/apps/api_web/test/api_web/canary_test.exs +++ b/apps/api_web/test/api_web/canary_test.exs @@ -43,6 +43,11 @@ defmodule ApiWeb.CanaryTest do assert {:error, "expect function/0 for notify_fn, got nil"} = Canary.start_link(notify_fn: nil) - assert_receive {:EXIT, _, "expect function/0 for notify_fn, got nil"} + # start_link consumes EXIT as of OTP 26, so we need to use spawn_link to trigger this. see: + # https://github.com/erlang/otp/issues/7524 and + # https://www.erlang.org/doc/apps/stdlib/gen_server.html#start_link/4 + pid = spawn_link(Canary, :start_link, [[notify_fn: nil]]) + + assert_receive {:EXIT, ^pid, "expect function/0 for notify_fn, got nil"} end end diff --git a/apps/state/test/state/server_test.exs b/apps/state/test/state/server_test.exs index 354f759b..9eb0194a 100644 --- a/apps/state/test/state/server_test.exs +++ b/apps/state/test/state/server_test.exs @@ -251,7 +251,14 @@ defmodule State.ServerTest do %Example{id: 2, data: :other} ]) - assert [%{data: 38}, %{data: 44}, %{data: :other}] = HooksServer.all() + # ETS tables appear to have different internal ordering on Mac and Linux as of OTP 26, so + # explicitly sorting here is necessary to fix this test. + assert [ + %Example{id: 1, data: 38}, + %Example{id: 1, data: 44}, + %Example{id: 2, data: :other} + ] = Enum.sort(HooksServer.all()) + assert [%{data: 38}, %{data: 44}] = HooksServer.by_id(1) assert [%{data: 38}] = HooksServer.select([%{data: 37}]) end