From 45b80415a6e98c9d4ffbecc7492a7535d0397254 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 3 Jan 2025 18:04:59 +0100 Subject: [PATCH 1/3] chore: bump dependencies to OTP-27-ready versions --- rebar.config | 6 +++--- rebar.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rebar.config b/rebar.config index 888f364..d651010 100644 --- a/rebar.config +++ b/rebar.config @@ -4,14 +4,14 @@ {deps, [ {supervisor3, "1.1.12"} - , {epgsql, "4.6.0"} - , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "0.18.0"}}} + , {epgsql, "4.7.1"} + , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.10"}}} ]}. {dialyzer, [{warnings, [unknown]}]}. {profiles, - [ {test, [ {deps, [ {proper, "1.3.0"} + [ {test, [ {deps, [ {proper, "1.4.0"} ]} , {cover_enabled, true} ]} diff --git a/rebar.lock b/rebar.lock index 0eac13d..4f2d36e 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,15 +1,15 @@ {"1.2.0", -[{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.6.0">>},0}, +[{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.7.1">>},0}, {<<"snabbkaffe">>, {git,"https://github.com/kafka4beam/snabbkaffe", - {ref,"bbabb87ff624821612879ed9961b661c7df04e4e"}}, + {ref,"b59298334ed349556f63405d1353184c63c66534"}}, 0}, {<<"supervisor3">>,{pkg,<<"supervisor3">>,<<"1.1.12">>},0}]}. [ {pkg_hash,[ - {<<"epgsql">>, <<"A403534D03811C867E79405BB18D6061A5FCEF92ACF0236A9150AC93748CE143">>}, + {<<"epgsql">>, <<"D4E47CAE46C18C8AFA88E34D59A9B4BAE16368D7CE1EB3DA24FA755EB28393EB">>}, {<<"supervisor3">>, <<"2FAB1AF26BB9F8AE07692BB30EF79D5F1940E1587EFF9C14C6C8B04B16B400A8">>}]}, {pkg_hash_ext,[ - {<<"epgsql">>, <<"6BE4910A02551F21EAB6F6F27D97B0D4B1DFFC617F1A64C8C95FDD45652FA9E1">>}, + {<<"epgsql">>, <<"B6D86B7DC42C8555B1D4E20880E5099D6D6D053148000E188E548F98E4E01836">>}, {<<"supervisor3">>, <<"62BF29F802C8620B7F9609FE5D81212B1AA5A75A7D86876B61CEA73BE58BA2A6">>}]} ]. From 36ff2b82dd07b75e824e77c5602b5170214f3230 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 3 Jan 2025 18:06:10 +0100 Subject: [PATCH 2/3] fix: remove custom deprecated `format_status/2` callback --- src/system_monitor_pg.erl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/system_monitor_pg.erl b/src/system_monitor_pg.erl index c0d5d5e..272650d 100644 --- a/src/system_monitor_pg.erl +++ b/src/system_monitor_pg.erl @@ -23,7 +23,6 @@ , handle_call/3 , handle_info/2 , handle_cast/2 - , format_status/2 , terminate/2 , connect_options/0 @@ -103,11 +102,6 @@ handle_cast({produce, Type, Events}, #{connection := Conn} = State) -> end, {noreply, State}. -format_status(normal, [_PDict, State]) -> - [{data, [{"State", State}]}]; -format_status(terminate, [_PDict, State]) -> - State. - terminate(_Reason, #{connection := undefined}) -> ok; terminate(_Reason, #{connection := Conn}) -> From 00132b52d5ba1f579c2f76434a34e692ffaa7c7b Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Fri, 3 Jan 2025 18:14:50 +0100 Subject: [PATCH 3/3] ci: run CI under 4 recent Erlang/OTP releases --- .github/workflows/ci.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c559c..f4ba714 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,24 +2,34 @@ name: CI on: [push, pull_request] jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + strategy: + matrix: + erlang: + - otp: "24" + rebar3: "3.20" + - otp: "25" + rebar3: "3.22" + - otp: "26" + rebar3: "3.22" + - otp: "27" + rebar3: "3.24" + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Erlang/OTP - run: | - OTP_VERSION="24.1.7-1" - UBUNTU_RELEASE="focal" - DEB_NAME="esl-erlang_${OTP_VERSION}~ubuntu~${UBUNTU_RELEASE}_amd64.deb" - echo $DEB_NAME - curl -f https://packages.erlang-solutions.com/erlang/debian/pool/$DEB_NAME -o $DEB_NAME - sudo dpkg --install $DEB_NAME + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.erlang.otp }} + rebar3-version: ${{ matrix.erlang.rebar3 }} + - name: Run tests run: make - name: Archive common test results if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: CT results path: _build/test/logs/**