Skip to content

Commit f1bbf3c

Browse files
authored
Merge pull request #243 from keynslug/chore/bump/otp-27-compat
chore: bump dependencies to OTP-27-ready versions
2 parents 0538172 + c073ad9 commit f1bbf3c

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

.github/workflows/run_test_case.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ on:
1111
jobs:
1212
run_test_case:
1313
runs-on: ubuntu-latest
14-
14+
strategy:
15+
matrix:
16+
otp:
17+
- vsn: "26.2.1-2"
18+
builder: "5.3-5:1.15.7-26.2.1-2-ubuntu24.04"
19+
- vsn: "27.2-1"
20+
builder: "5.4-3:1.17.3-27.2-1-ubuntu24.04"
21+
1522
container:
16-
image: ghcr.io/emqx/emqx-builder/5.3-5:1.15.7-26.2.1-2-ubuntu24.04
23+
image: "ghcr.io/emqx/emqx-builder/${{ matrix.otp.builder }}"
1724

1825
steps:
1926
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
@@ -28,6 +35,7 @@ jobs:
2835
make eunit
2936
make ct
3037
make cover
38+
3139
- name: Coveralls
3240
env:
3341
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -36,9 +44,9 @@ jobs:
3644
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
3745
if: always()
3846
with:
39-
name: logs
47+
name: "logs-${{ matrix.otp.vsn }}"
4048
path: _build/test/logs
4149
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
4250
with:
43-
name: cover
51+
name: "cover-${{ matrix.otp.vsn }}"
4452
path: _build/test/cover

rebar.config

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
%% -*- mode:erlang -*-
22
{minimum_otp_vsn, "21.0"}.
33

4-
{deps, [{jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}},
5-
{eetcd, {git, "https://github.com/zhongwencool/eetcd", {tag, "v0.3.4"}}},
6-
{snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.0"}}},
4+
{deps, [{jsone, "1.9.0"},
5+
{eetcd, {git, "https://github.com/zhongwencool/eetcd", {tag, "v0.5.0"}}},
6+
{snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.10"}}},
77
{mria, {git, "https://github.com/emqx/mria", {tag, "0.8.11"}}}
88
]}.
99

@@ -31,13 +31,13 @@
3131

3232
{dialyzer,
3333
[{warnings, [unknown]},
34-
{plt_extra_apps, [jiffy, mria]}
34+
{plt_extra_apps, [mria]}
3535
]}.
3636

3737
{profiles,
3838
[{test,
3939
[{plugins, [{coveralls, {git, "https://github.com/emqx/coveralls-erl", {branch, "github"}}}]},
40-
{deps, [{meck, "0.8.13"},
40+
{deps, [{meck, "1.0.0"},
4141
{proper, "1.3.0"}
4242
]},
4343
{erl_opts, [debug_info]},

src/ekka.app.src

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
stdlib,
1212
inets,
1313
eetcd,
14+
jsone,
1415
snabbkaffe,
1516
mria
1617
]},

src/ekka_cluster_etcd.erl

+4-4
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ init(Options) ->
343343
Servers = proplists:get_value(server, Options, []),
344344
Prefix = proplists:get_value(prefix, Options),
345345
Hosts = [remove_scheme(Server) || Server <- Servers],
346-
{Transport, TransportOpts} = case ssl_options(Options) of
347-
[] -> {tcp, []};
348-
[SSL] -> SSL
346+
TransportOpts = case ssl_options(Options) of
347+
[] -> [{transport, tcp}];
348+
[{ssl, TLSOpts}] -> [{transport, tls}, {tls_opts, TLSOpts}]
349349
end,
350350
%% At the time of writing, the etcd connection process does not
351351
%% close when this process dies. So, when this processes is
@@ -354,7 +354,7 @@ init(Options) ->
354354
%% that no connection with this name exists before opening it
355355
%% (again).
356356
eetcd:close(?MODULE),
357-
{ok, _Pid} = eetcd:open(?MODULE, Hosts, Transport, TransportOpts),
357+
{ok, _Pid} = eetcd:open(?MODULE, Hosts, TransportOpts),
358358
{ok, #{'ID' := ID}} = eetcd_lease:grant(?MODULE, 5),
359359
{ok, Pid2} = eetcd_lease:keep_alive(?MODULE, ID),
360360
true = link(Pid2),

src/ekka_httpc.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ parse_response({ok, {{_, Code, _}, _Headers, Body}}) ->
9999
parse_response({ok, {Code, Body}}) ->
100100
parse_response({ok, Code, Body});
101101
parse_response({ok, 200, Body}) ->
102-
{ok, jiffy:decode(iolist_to_binary(Body), [return_maps])};
102+
{ok, jsone:decode(iolist_to_binary(Body))};
103103
parse_response({ok, 201, Body}) ->
104-
{ok, jiffy:decode(iolist_to_binary(Body), [return_maps])};
104+
{ok, jsone:decode(iolist_to_binary(Body))};
105105
parse_response({ok, 204, _Body}) ->
106106
{ok, []};
107107
parse_response({ok, Code, Body}) ->

test/mod_etcd.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ do(_Req = #mod{method = "GET", request_uri = "/v2/keys/" ++ _Uri}) ->
3030
Nodes)
3131
}
3232
},
33-
Response = {200, binary_to_list(jiffy:encode(Body))},
33+
Response = {200, binary_to_list(jsone:encode(Body))},
3434
{proceed, [{response, Response}]};
3535
do(_Req = #mod{request_uri = "/v2/keys/" ++ _Uri}) ->
3636
{proceed, [{response, {200, "{\"errorCode\": 0}"}}]};

0 commit comments

Comments
 (0)