Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump dependencies to OTP-27-ready versions #243

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/run_test_case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ on:
jobs:
run_test_case:
runs-on: ubuntu-latest

strategy:
matrix:
otp:
- vsn: "26.2.1-2"
builder: "5.3-5:1.15.7-26.2.1-2-ubuntu24.04"
- vsn: "27.2-1"
builder: "5.4-3:1.17.3-27.2-1-ubuntu24.04"

container:
image: ghcr.io/emqx/emqx-builder/5.3-5:1.15.7-26.2.1-2-ubuntu24.04
image: "ghcr.io/emqx/emqx-builder/${{ matrix.otp.builder }}"

steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand All @@ -28,6 +35,7 @@ jobs:
make eunit
make ct
make cover

- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -36,9 +44,9 @@ jobs:
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: always()
with:
name: logs
name: "logs-${{ matrix.otp.vsn }}"
path: _build/test/logs
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: cover
name: "cover-${{ matrix.otp.vsn }}"
path: _build/test/cover
10 changes: 5 additions & 5 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%% -*- mode:erlang -*-
{minimum_otp_vsn, "21.0"}.

{deps, [{jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}},
{eetcd, {git, "https://github.com/zhongwencool/eetcd", {tag, "v0.3.4"}}},
{snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.0"}}},
{deps, [{jsone, "1.9.0"},
{eetcd, {git, "https://github.com/zhongwencool/eetcd", {tag, "v0.5.0"}}},
{snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.10"}}},
{mria, {git, "https://github.com/emqx/mria", {tag, "0.8.11"}}}
]}.

Expand Down Expand Up @@ -31,13 +31,13 @@

{dialyzer,
[{warnings, [unknown]},
{plt_extra_apps, [jiffy, mria]}
{plt_extra_apps, [mria]}
]}.

{profiles,
[{test,
[{plugins, [{coveralls, {git, "https://github.com/emqx/coveralls-erl", {branch, "github"}}}]},
{deps, [{meck, "0.8.13"},
{deps, [{meck, "1.0.0"},
{proper, "1.3.0"}
]},
{erl_opts, [debug_info]},
Expand Down
1 change: 1 addition & 0 deletions src/ekka.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
stdlib,
inets,
eetcd,
jsone,
snabbkaffe,
mria
]},
Expand Down
8 changes: 4 additions & 4 deletions src/ekka_cluster_etcd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ init(Options) ->
Servers = proplists:get_value(server, Options, []),
Prefix = proplists:get_value(prefix, Options),
Hosts = [remove_scheme(Server) || Server <- Servers],
{Transport, TransportOpts} = case ssl_options(Options) of
[] -> {tcp, []};
[SSL] -> SSL
TransportOpts = case ssl_options(Options) of
[] -> [{transport, tcp}];
[{ssl, TLSOpts}] -> [{transport, tls}, {tls_opts, TLSOpts}]
end,
%% At the time of writing, the etcd connection process does not
%% close when this process dies. So, when this processes is
Expand All @@ -354,7 +354,7 @@ init(Options) ->
%% that no connection with this name exists before opening it
%% (again).
eetcd:close(?MODULE),
{ok, _Pid} = eetcd:open(?MODULE, Hosts, Transport, TransportOpts),
{ok, _Pid} = eetcd:open(?MODULE, Hosts, TransportOpts),
{ok, #{'ID' := ID}} = eetcd_lease:grant(?MODULE, 5),
{ok, Pid2} = eetcd_lease:keep_alive(?MODULE, ID),
true = link(Pid2),
Expand Down
4 changes: 2 additions & 2 deletions src/ekka_httpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ parse_response({ok, {{_, Code, _}, _Headers, Body}}) ->
parse_response({ok, {Code, Body}}) ->
parse_response({ok, Code, Body});
parse_response({ok, 200, Body}) ->
{ok, jiffy:decode(iolist_to_binary(Body), [return_maps])};
{ok, jsone:decode(iolist_to_binary(Body))};
parse_response({ok, 201, Body}) ->
{ok, jiffy:decode(iolist_to_binary(Body), [return_maps])};
{ok, jsone:decode(iolist_to_binary(Body))};
parse_response({ok, 204, _Body}) ->
{ok, []};
parse_response({ok, Code, Body}) ->
Expand Down
2 changes: 1 addition & 1 deletion test/mod_etcd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ do(_Req = #mod{method = "GET", request_uri = "/v2/keys/" ++ _Uri}) ->
Nodes)
}
},
Response = {200, binary_to_list(jiffy:encode(Body))},
Response = {200, binary_to_list(jsone:encode(Body))},
{proceed, [{response, Response}]};
do(_Req = #mod{request_uri = "/v2/keys/" ++ _Uri}) ->
{proceed, [{response, {200, "{\"errorCode\": 0}"}}]};
Expand Down
Loading