From 2699c75ad532022007c4c027fdfecf2d37ee15c0 Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Fri, 11 Sep 2026 08:47:49 +0200 Subject: [PATCH 1/4] chore: update kura stack to latest and drop pgo kura v2.0.8 -> v2.20.12, kura_postgres v0.4.2 -> v1.1.3 (minato driver), rebar3_kura pinned to v0.16.4, nova 0.14.3 -> 0.16.1 via relock. The unpinned rebar3_kura plugin had started bundling kura 2.20, whose kura_dialect behaviour shadowed the project's kura 2.0.8 at compile time and broke CI. pg_types config was pgo-only and is removed. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011ePHyY6bgheH2WuHz7PUsR --- config/sys.config | 4 ---- config/sys.docker.config | 4 ---- rebar.config | 6 +++--- rebar.lock | 37 ++++++++++++++----------------------- src/ldf.app.src | 1 - 5 files changed, 17 insertions(+), 35 deletions(-) diff --git a/config/sys.config b/config/sys.config index eae8bef..5242383 100644 --- a/config/sys.config +++ b/config/sys.config @@ -17,10 +17,6 @@ } }} ]}, - {pg_types, [ - {uuid_format, string}, - {json_config, {json, [maps, binary], [maps, binary, atom_keys]}} - ]}, {nova, [ {cowboy_configuration, #{ port => 8095 diff --git a/config/sys.docker.config b/config/sys.docker.config index 3001e25..6d138d5 100644 --- a/config/sys.docker.config +++ b/config/sys.docker.config @@ -17,10 +17,6 @@ } }} ]}, - {pg_types, [ - {uuid_format, string}, - {json_config, {json, [maps, binary], [maps, binary, atom_keys]}} - ]}, {nova, [ {cowboy_configuration, #{ port => 8095 diff --git a/rebar.config b/rebar.config index 80f6ee7..07fe142 100644 --- a/rebar.config +++ b/rebar.config @@ -14,8 +14,8 @@ ]}. {deps, [ - {kura, {git, "https://github.com/Taure/kura.git", {tag, "v2.0.8"}}}, - {kura_postgres, {git, "https://github.com/Taure/kura_postgres.git", {tag, "v0.4.2"}}}, + {kura, {git, "https://github.com/Taure/kura.git", {tag, "v2.20.12"}}}, + {kura_postgres, {git, "https://github.com/Taure/kura_postgres.git", {tag, "v1.1.3"}}}, {datastar, {git, "https://github.com/Taure/datastar.git", {branch, "main"}}}, {datastar_nova, {git, "https://github.com/Taure/datastar_nova.git", {tag, "v0.1.0"}}}, nova @@ -35,7 +35,7 @@ %% Plugins for rebar3 {plugins, [ rebar3_auto, - rebar3_kura, + {rebar3_kura, {git, "https://github.com/Taure/rebar3_kura.git", {tag, "v0.16.4"}}}, {rebar3_erlydtl_plugin, ".*", {git, "https://github.com/tsloughter/rebar3_erlydtl_plugin.git", {branch, "master"}}}, erlfmt diff --git a/rebar.lock b/rebar.lock index ee39c2f..86642b1 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,7 +1,6 @@ {"1.2.0", -[{<<"backoff">>,{pkg,<<"backoff">>,<<"1.1.6">>},2}, - {<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.15.0">>},1}, - {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.17.1">>},2}, +[{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.18.0">>},1}, + {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.19.0">>},2}, {<<"datastar">>, {git,"https://github.com/Taure/datastar.git", {ref,"fcc11f399294b305620a7c99ed633b898ce3889b"}}, @@ -14,45 +13,37 @@ {<<"jhn_stdlib">>,{pkg,<<"jhn_stdlib">>,<<"5.11.2">>},1}, {<<"kura">>, {git,"https://github.com/Taure/kura.git", - {ref,"fdb1abc5fdc0cc48c34b7d33fd8e0d6748c4a7d1"}}, + {ref,"2fa6d253af528f3185dd5669efecc018fc9e27cf"}}, 0}, {<<"kura_postgres">>, {git,"https://github.com/Taure/kura_postgres.git", - {ref,"30651b35986bda5fc84d89fc141936cb70b636ab"}}, + {ref,"794fbae00a9fe22ac91770e3e52e612fd7cf61b7"}}, 0}, - {<<"nova">>,{pkg,<<"nova">>,<<"0.14.3">>},0}, - {<<"opentelemetry_api">>,{pkg,<<"opentelemetry_api">>,<<"1.5.0">>},2}, - {<<"pg_types">>,{pkg,<<"pg_types">>,<<"0.6.0">>},2}, - {<<"pgo">>,{pkg,<<"pgo">>,<<"0.20.0">>},1}, + {<<"minato">>,{pkg,<<"minato">>,<<"1.0.2">>},1}, + {<<"nova">>,{pkg,<<"nova">>,<<"0.16.1">>},0}, {<<"ranch">>,{pkg,<<"ranch">>,<<"2.2.0">>},2}, {<<"routing_tree">>,{pkg,<<"routing_tree">>,<<"1.0.11">>},1}, {<<"telemetry">>,{pkg,<<"telemetry">>,<<"1.4.2">>},1}, {<<"thoas">>,{pkg,<<"thoas">>,<<"1.2.1">>},1}]}. [ {pkg_hash,[ - {<<"backoff">>, <<"83B72ED2108BA1EE8F7D1C22E0B4A00CFE3593A67DBC792799E8CCE9F42F796B">>}, - {<<"cowboy">>, <<"9CFE86ED7117BF045E10ADBEDB0170AF7BE57F2A3637E7BE143433D8DD267396">>}, - {<<"cowlib">>, <<"3E6053016D1AB245730F0AF688755476DCEDB1C25ED8FB5751F59A2BFDC0C9AF">>}, + {<<"cowboy">>, <<"BFF388EB4D6356CB3F88C26E65B515976BF04B401B805D31550C3E60EBA8FE18">>}, + {<<"cowlib">>, <<"C9D11C9D035472E27A740C9F327786C61ED209269B4BE0260D59D3EC07B8949F">>}, {<<"erlydtl">>, <<"964B2DC84F8C17ACFAA69C59BA129EF26AC45D2BA898C3C6AD9B5BDC8BA13CED">>}, {<<"jhn_stdlib">>, <<"785074F3CA368EAA8E9AF1592BC19AE9EF1F7AF30B2CD6456A6083173A8F5CCB">>}, - {<<"nova">>, <<"2F08F11162A871CB1AA361BFEFE66D945F3284243F7EA6582AD8CA709BAFE2F3">>}, - {<<"opentelemetry_api">>, <<"1A676F3E3340CAB81C763E939A42E11A70C22863F645AA06AAFEFC689B5550CF">>}, - {<<"pg_types">>, <<"B530C56330A59288BE49CDD27739EC025B6E877A475AE70BF95B04F1E3A817C4">>}, - {<<"pgo">>, <<"4F4A1FCB0A4894311BE238195BDAD4DF80312AB091DB87FE5348FAFA4DA75F87">>}, + {<<"minato">>, <<"962EE20DA49457633BB2B4D01ACF0C8D504BA6407AC8CF93BC075C9F88832043">>}, + {<<"nova">>, <<"E1C9C5B7E4E8B7452200C9D091FF7AE8BC53D5539EB9837472874A6512A1D333">>}, {<<"ranch">>, <<"25528F82BC8D7C6152C57666CA99EC716510FE0925CB188172F41CE93117B1B0">>}, {<<"routing_tree">>, <<"72ACEF2095F0EC804F7AFD07EF781DDE5009425A1CA0A28F0706B1DB334A4812">>}, {<<"telemetry">>, <<"A0CB522801DFFB1C49FE6E30561BADFFC7B6D0E180DB1300DF759FAA22062855">>}, {<<"thoas">>, <<"19A25F31177A17E74004D4840F66D791D4298C5738790FA2CC73731EB911F195">>}]}, {pkg_hash_ext,[ - {<<"backoff">>, <<"CF0CFFF8995FB20562F822E5CC47D8CCF664C5ECDC26A684CBE85C225F9D7C39">>}, - {<<"cowboy">>, <<"179FB65140FB440A17B767AD53B755081506F9596C4DB5C49C0396D8C8643668">>}, - {<<"cowlib">>, <<"FF08BD17E6DD931445B18AF77315B9B5FE052407110964AD2588C686B57B5E3F">>}, + {<<"cowboy">>, <<"62D0B26ABCF455054972B0DA242389C69D5982CE5914AFB8C344517F667B9600">>}, + {<<"cowlib">>, <<"6DC66E3135B229193EA4DCB14294E79520C923D391315C9C962EF0B4BEA72356">>}, {<<"erlydtl">>, <<"D80EC044CD8F58809C19D29AC5605BE09E955040911B644505E31E9DD8143431">>}, {<<"jhn_stdlib">>, <<"2329CD16DEE46704AAB6184D09508E59DBA31C4D3255271DBB7D34D115ECA508">>}, - {<<"nova">>, <<"D35D0CEF073749958D2E7E446DED07354F5A3A6B96A31009A2E89D382BE72EF4">>}, - {<<"opentelemetry_api">>, <<"F53EC8A1337AE4A487D43AC89DA4BD3A3C99DDF576655D071DEED8B56A2D5DDA">>}, - {<<"pg_types">>, <<"9949A4849DD13408FA249AB7B745E0D2DFDB9532AEE2B9722326E33CD082A778">>}, - {<<"pgo">>, <<"2F11E6649CEB38E569EF56B16BE1D04874AE5B11A02867080A2817CE423C683B">>}, + {<<"minato">>, <<"387F943683287F06C3570852B79CC2A35D36E2EFC5A3B997587845C4E0286053">>}, + {<<"nova">>, <<"05F87B2F4C05DFAA87A93CFADAEF71B735FE3E5DDEC430596170EF4A9C443804">>}, {<<"ranch">>, <<"FA0B99A1780C80218A4197A59EA8D3BDAE32FBFF7E88527D7D8A4787EFF4F8E7">>}, {<<"routing_tree">>, <<"85982C7AC502892C5179CD2A591331003BACD2D2A71723640BA7D23F45408E6E">>}, {<<"telemetry">>, <<"928F6495066506077862C0D1646609EED891A4326BEE3126BA54B60AF61FEBB1">>}, diff --git a/src/ldf.app.src b/src/ldf.app.src index 4f274ec..5338c41 100644 --- a/src/ldf.app.src +++ b/src/ldf.app.src @@ -11,7 +11,6 @@ runtime_tools, nova, xmerl, - pgo, kura, kura_postgres, datastar, From bdfbd3347b54b4cc6ac139db07bd0225b22b0a80 Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Fri, 11 Sep 2026 08:47:49 +0200 Subject: [PATCH 2/4] build: build image on OTP 28.3.1 minato requires OTP 28; the image was still built on 27.0.1. Matches .tool-versions. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011ePHyY6bgheH2WuHz7PUsR --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9bf31b1..dcf5b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage 0 -FROM erlang:27.0.1.0-alpine +FROM erlang:28.3.1.0-alpine # Set working directory RUN mkdir /buildroot From e0551e7f9c65c249707f7d064d84c6db49156355 Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Fri, 11 Sep 2026 09:16:08 +0200 Subject: [PATCH 3/4] chore: format schemas and migrations with erlfmt Both directories were outside the erlfmt globs, and the listed src/plugins directory does not exist. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011ePHyY6bgheH2WuHz7PUsR --- rebar.config | 3 +- .../m20260624090043_update_schema.erl | 40 ++++++++++--------- .../m20260624171034_alter_ldf_message.erl | 16 +++++--- src/schemas/ldf_message.erl | 13 +++--- src/schemas/li.erl | 21 +++++----- 5 files changed, 52 insertions(+), 41 deletions(-) diff --git a/rebar.config b/rebar.config index 07fe142..77cba3b 100644 --- a/rebar.config +++ b/rebar.config @@ -65,7 +65,8 @@ {files, [ "{rebar.config, elvis.config, src, include,test}/*.{hrl,erl}", "src/controllers/*.erl", - "src/plugins/*.erl", + "src/schemas/*.erl", + "src/migrations/*.erl", "config/*" ]} ]}. diff --git a/src/migrations/m20260624090043_update_schema.erl b/src/migrations/m20260624090043_update_schema.erl index d4c97d3..cdf87f8 100644 --- a/src/migrations/m20260624090043_update_schema.erl +++ b/src/migrations/m20260624090043_update_schema.erl @@ -6,24 +6,28 @@ -spec up() -> [kura_migration:operation()]. up() -> - [{create_table, ~"ldf_message", [ - #kura_column{name = id, type = id, primary_key = true}, - #kura_column{name = message_id, type = uuid, nullable = false}, - #kura_column{name = payload, type = string}, - #kura_column{name = content_length, type = string} - ]}, - {create_table, ~"li", [ - #kura_column{name = id, type = id, primary_key = true}, - #kura_column{name = type, type = string, nullable = false}, - #kura_column{name = value, type = string, nullable = false}, - #kura_column{name = callback_id, type = uuid, nullable = false}, - #kura_column{name = user_id, type = uuid, nullable = false}, - #kura_column{name = username, type = string}, - #kura_column{name = phone_number, type = string}, - #kura_column{name = email, type = string} - ]}]. + [ + {create_table, ~"ldf_message", [ + #kura_column{name = id, type = id, primary_key = true}, + #kura_column{name = message_id, type = uuid, nullable = false}, + #kura_column{name = payload, type = string}, + #kura_column{name = content_length, type = string} + ]}, + {create_table, ~"li", [ + #kura_column{name = id, type = id, primary_key = true}, + #kura_column{name = type, type = string, nullable = false}, + #kura_column{name = value, type = string, nullable = false}, + #kura_column{name = callback_id, type = uuid, nullable = false}, + #kura_column{name = user_id, type = uuid, nullable = false}, + #kura_column{name = username, type = string}, + #kura_column{name = phone_number, type = string}, + #kura_column{name = email, type = string} + ]} + ]. -spec down() -> [kura_migration:operation()]. down() -> - [{drop_table, ~"ldf_message"}, - {drop_table, ~"li"}]. + [ + {drop_table, ~"ldf_message"}, + {drop_table, ~"li"} + ]. diff --git a/src/migrations/m20260624171034_alter_ldf_message.erl b/src/migrations/m20260624171034_alter_ldf_message.erl index 87392ca..5ed01e5 100644 --- a/src/migrations/m20260624171034_alter_ldf_message.erl +++ b/src/migrations/m20260624171034_alter_ldf_message.erl @@ -6,12 +6,16 @@ -spec up() -> [kura_migration:operation()]. up() -> - [{alter_table, ~"ldf_message", [ - {modify_column, payload, text} - ]}]. + [ + {alter_table, ~"ldf_message", [ + {modify_column, payload, text} + ]} + ]. -spec down() -> [kura_migration:operation()]. down() -> - [{alter_table, ~"ldf_message", [ - {modify_column, payload, string} - ]}]. + [ + {alter_table, ~"ldf_message", [ + {modify_column, payload, string} + ]} + ]. diff --git a/src/schemas/ldf_message.erl b/src/schemas/ldf_message.erl index 00f2e71..ded710d 100644 --- a/src/schemas/ldf_message.erl +++ b/src/schemas/ldf_message.erl @@ -7,9 +7,10 @@ table() -> ~"ldf_message". -fields() -> [ - #kura_field{name = id, type = id, primary_key = true}, - #kura_field{name = message_id, type = uuid, nullable = false}, - #kura_field{name = payload, type = text}, - #kura_field{name = content_length, type = string} -]. +fields() -> + [ + #kura_field{name = id, type = id, primary_key = true}, + #kura_field{name = message_id, type = uuid, nullable = false}, + #kura_field{name = payload, type = text}, + #kura_field{name = content_length, type = string} + ]. diff --git a/src/schemas/li.erl b/src/schemas/li.erl index 4a2c0b9..be07b5b 100644 --- a/src/schemas/li.erl +++ b/src/schemas/li.erl @@ -7,13 +7,14 @@ table() -> ~"li". -fields() -> [ - #kura_field{name = id, type = id, primary_key = true}, - #kura_field{name = type, type = string, nullable = false}, - #kura_field{name = value, type = string, nullable = false}, - #kura_field{name = callback_id, type = uuid, nullable = false}, - #kura_field{name = user_id, type = uuid, nullable = false}, - #kura_field{name = username, type = string}, - #kura_field{name = phone_number, type = string}, - #kura_field{name = email, type = string} -]. +fields() -> + [ + #kura_field{name = id, type = id, primary_key = true}, + #kura_field{name = type, type = string, nullable = false}, + #kura_field{name = value, type = string, nullable = false}, + #kura_field{name = callback_id, type = uuid, nullable = false}, + #kura_field{name = user_id, type = uuid, nullable = false}, + #kura_field{name = username, type = string}, + #kura_field{name = phone_number, type = string}, + #kura_field{name = email, type = string} + ]. From 20d88073d82af02e434493586844e1495702e673 Mon Sep 17 00:00:00 2001 From: Daniel Widgren Date: Fri, 11 Sep 2026 09:16:08 +0200 Subject: [PATCH 4/4] build: pin runtime alpine and run eunit in CI on the shipped OTP The builder is pinned to erlang:28.3.1.0-alpine (Alpine 3.23) while the runtime stage floated on alpine:latest. CI now runs OTP 28.3.1 to match .tool-versions and the image, and runs the eunit suite it never ran. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011ePHyY6bgheH2WuHz7PUsR --- .github/workflows/erlang.yml | 4 +++- Dockerfile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 8a727ee..2724061 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - otp: ['28.0'] + otp: ['28.3.1'] rebar3: ['3.26.0'] steps: - uses: actions/checkout@v4 @@ -22,6 +22,8 @@ jobs: version-type: strict - name: Compile run: rebar3 compile + - name: Run eunit + run: rebar3 eunit - name: Run dialyzer run: rebar3 dialyzer - name: Run xref diff --git a/Dockerfile b/Dockerfile index dcf5b11..fa4a069 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --update git RUN rebar3 release # Build stage 1 -FROM alpine +FROM alpine:3.23 # Install some libs RUN apk add --no-cache openssl && \