From cdb61e11949cf93e4848b7d8f6fa6c365c0f9043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Mon, 23 Mar 2026 17:14:54 +0100 Subject: [PATCH 1/3] Add OTP 29 to CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Svensson --- .github/workflows/ci.yml | 5 +++-- .github/workflows/db-compatibility.yml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b04b67..f6159e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: sudo apt update sudo apt install emacs-nox - name: Install Erlang/OTP - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 + uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 with: otp-version: '28.1.1' rebar3-version: '3.25.1' @@ -47,12 +47,13 @@ jobs: fail-fast: false matrix: include: + - otp-version: '29.0-rc3' - otp-version: '28.1.1' - otp-version: '27.3.4.6' steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install Erlang/OTP - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 + uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 with: otp-version: ${{ matrix.otp-version }} rebar3-version: '3.25.1' diff --git a/.github/workflows/db-compatibility.yml b/.github/workflows/db-compatibility.yml index 75ccaf3..c6b93ba 100644 --- a/.github/workflows/db-compatibility.yml +++ b/.github/workflows/db-compatibility.yml @@ -25,7 +25,7 @@ jobs: packages: redis-server version: 1.0 - name: Install Erlang/OTP - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 + uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 with: otp-version: '28.1.1' rebar3-version: '3.25.1' @@ -53,7 +53,7 @@ jobs: packages: redis-server faketime version: 1.0 - name: Install Erlang/OTP - uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 + uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0 with: otp-version: '28.1.1' rebar3-version: '3.25.1' From 0c89e00fdc3cedea39642c967c7f6406fedb1fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Mon, 23 Mar 2026 18:13:29 +0100 Subject: [PATCH 2/3] Replace deprecated catch operator with try...catch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The catch operator is deprecated and OTP 29 will emit compiler warnings for its use. https://www.erlang.org/news/185#compiler-warnings Signed-off-by: Björn Svensson --- src/ered_cluster.erl | 6 ++++-- test/ered_cluster_SUITE.erl | 7 +++++-- test/ered_cluster_tls_SUITE.erl | 7 +++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ered_cluster.erl b/src/ered_cluster.erl index 8c08fa7..5e4139c 100644 --- a/src/ered_cluster.erl +++ b/src/ered_cluster.erl @@ -583,8 +583,10 @@ handle_info(_Ignore, State) -> {noreply, State}. terminate(Reason, State) -> - catch [ered_client_sup:stop_client(State#st.client_sup, Pid) - || Pid <- maps:values(State#st.nodes)], + try [ered_client_sup:stop_client(State#st.client_sup, Pid) + || Pid <- maps:values(State#st.nodes)] + catch _:_ -> ok + end, ered_info_msg:cluster_stopped(State#st.info_pid, Reason). code_change(_OldVsn, State = #st{}, _Extra) -> diff --git a/test/ered_cluster_SUITE.erl b/test/ered_cluster_SUITE.erl index 0c4f966..f158de0 100644 --- a/test/ered_cluster_SUITE.erl +++ b/test/ered_cluster_SUITE.erl @@ -65,10 +65,13 @@ init_per_suite(_Config) -> init_per_testcase(_Testcase, Config) -> %% Quick check that cluster is OK; otherwise restart everything. - case catch ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of + try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of ok -> []; - _ -> + _ -> % Cluster inconsistent but all nodes reachable. + ct:pal("Re-initialize the cluster"), + init_per_suite(Config) + catch _:_ -> % One or more nodes unreachable. ct:pal("Re-initialize the cluster"), init_per_suite(Config) end. diff --git a/test/ered_cluster_tls_SUITE.erl b/test/ered_cluster_tls_SUITE.erl index e0ab5e1..da30a4a 100644 --- a/test/ered_cluster_tls_SUITE.erl +++ b/test/ered_cluster_tls_SUITE.erl @@ -55,10 +55,13 @@ init_per_testcase(_Testcase, Config) -> generate_client_cert(), %% Quick check that cluster is OK; otherwise restart everything. - case catch ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of + try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of ok -> []; - _ -> + _ -> % Cluster inconsistent but all nodes reachable. + ct:pal("Re-initialize the cluster"), + init_per_suite(Config) + catch _:_ -> % One or more nodes unreachable. ct:pal("Re-initialize the cluster"), init_per_suite(Config) end. From 67a64e4a1db65e7c2eb9a14a51c0ad80844a059d Mon Sep 17 00:00:00 2001 From: User Date: Wed, 22 Apr 2026 08:55:59 +0200 Subject: [PATCH 3/3] fixup: improve log output in test and remove code comment Signed-off-by: User --- test/ered_cluster_SUITE.erl | 8 ++++---- test/ered_cluster_tls_SUITE.erl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/ered_cluster_SUITE.erl b/test/ered_cluster_SUITE.erl index f158de0..8e9cdd9 100644 --- a/test/ered_cluster_SUITE.erl +++ b/test/ered_cluster_SUITE.erl @@ -68,11 +68,11 @@ init_per_testcase(_Testcase, Config) -> try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of ok -> []; - _ -> % Cluster inconsistent but all nodes reachable. - ct:pal("Re-initialize the cluster"), + _ -> + ct:pal("Cluster inconsistent but all nodes reachable. Re-initialize the cluster."), init_per_suite(Config) - catch _:_ -> % One or more nodes unreachable. - ct:pal("Re-initialize the cluster"), + catch _:_ -> + ct:pal("One or more nodes unreachable. Re-initialize the cluster."), init_per_suite(Config) end. diff --git a/test/ered_cluster_tls_SUITE.erl b/test/ered_cluster_tls_SUITE.erl index da30a4a..683f175 100644 --- a/test/ered_cluster_tls_SUITE.erl +++ b/test/ered_cluster_tls_SUITE.erl @@ -58,11 +58,11 @@ init_per_testcase(_Testcase, Config) -> try ered_test_utils:check_consistent_cluster(?PORTS, ?CLIENT_OPTS) of ok -> []; - _ -> % Cluster inconsistent but all nodes reachable. - ct:pal("Re-initialize the cluster"), + _ -> + ct:pal("Cluster inconsistent but all nodes reachable. Re-initialize the cluster."), init_per_suite(Config) - catch _:_ -> % One or more nodes unreachable. - ct:pal("Re-initialize the cluster"), + catch _:_ -> + ct:pal("One or more nodes unreachable. Re-initialize the cluster."), init_per_suite(Config) end.