Skip to content

Commit bec620d

Browse files
authored
Merge pull request #136 from esl/otp24
OTP24 support
2 parents a83947b + 46d2c92 commit bec620d

File tree

16 files changed

+92
-72
lines changed

16 files changed

+92
-72
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ jobs:
1111
name: ${{ matrix.test-type }} test on OTP ${{matrix.otp}}
1212
strategy:
1313
matrix:
14-
otp: ['22.3', '21.3']
15-
test-type: [ 'regular', 'integration' ]
14+
otp: ['24.0', '23.3.1']
15+
test-type: ['regular', 'integration']
1616
runs-on: 'ubuntu-20.04'
1717
steps:
1818
- uses: actions/checkout@v2
19-
with:
20-
fetch-depth: 0
21-
- uses: ErlGang/setup-erlang@v1.0.0
19+
- uses: erlef/setup-beam@v1
2220
with:
2321
otp-version: ${{ matrix.otp }}
22+
rebar3-version: '3.16.1'
2423
- if: matrix.test-type == 'regular'
2524
run: make test
26-
- if: matrix.test-type == 'integration'
25+
- if: matrix.test-type == 'integration'
2726
run: make integration_test
2827
env:
29-
TRAVIS_OTP_RELEASE: ${{ matrix.otp }}
28+
OTP_RELEASE: ${{ matrix.otp }}

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM phusion/baseimage:18.04-1.0.0 as amoc-build
2-
3-
ARG otp_vsn=22.3.4-1
1+
FROM phusion/baseimage:focal-1.0.0 as amoc-build
42

53
RUN apt-get update && \
64
apt-get install -y --no-install-recommends \
7-
git make wget gnupg && \
8-
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
5+
git make wget gnupg
6+
7+
ARG otp_vsn=24.0-1
8+
9+
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
910
dpkg -i erlang-solutions_2.0_all.deb && \
1011
apt-get update && \
1112
apt-get install -y esl-erlang=1:${otp_vsn}
@@ -16,7 +17,7 @@ RUN cd amoc_build && \
1617
git clean -ffxd && \
1718
make rel
1819

19-
FROM phusion/baseimage:18.04-1.0.0
20+
FROM phusion/baseimage:focal-1.0.0
2021
MAINTAINER Erlang Solutions <mongoose-im@erlang-solutions.com>
2122

2223
RUN useradd -ms /bin/bash amoc

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
.PHONY: all rel compile clean ct test integration_test dialyzer xref console lint
22

3-
REBAR = ./rebar3
3+
REBARVER = 3.16.1
4+
5+
REBAR = rebar3
46

57
ifdef SUITE
68
SUITE_OPTS = --suite $$SUITE
79
endif
810

911
all: rel
1012

11-
rel:
12-
$(REBAR) as prod tar
13+
rel: rebar3
14+
./rebar3 as prod tar
1315

1416
compile:
1517
$(REBAR) as prod compile
@@ -38,6 +40,10 @@ rerun_integration_test:
3840
./integration_test/test_run_scenario.sh
3941
./integration_test/test_add_new_node.sh
4042

43+
rebar3:
44+
wget https://github.com/erlang/rebar3/releases/download/${REBARVER}/rebar3 &&\
45+
chmod u+x rebar3
46+
4147
dialyzer:
4248
$(REBAR) as prod dialyzer
4349

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# A Murder of Crows [![](https://github.com/esl/amoc/workflows/CI/badge.svg)](https://github.com/esl/amoc/actions?query=workflow%3ACI)
1+
# A Murder of Crows
2+
[![](https://github.com/esl/amoc/workflows/CI/badge.svg)](https://github.com/esl/amoc/actions?query=workflow%3ACI)
23

34
----------------------------------------------------------------------------------------------
45
A Murder of Crows, aka amoc, is a simple framework for running massively parallel tests in a distributed environment.

doc/http-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ With default options API will be running on port 4000. You can set other port by
1515
In Amoc we use Swagger UI so if you want the current documentation in a nice format you can find it under `/api-docs/` path.
1616
Just open it in your browser (e.g. http://localhost:4000/api-docs/)
1717

18-
You can also find the current documentation [here](https://esl.github.io/amoc_rest/?v=1.1.0)
18+
You can also find the current documentation [here](https://esl.github.io/amoc_rest/?v=1.1.1)
1919
(without possibility to execute requests)

integration_test/build_docker_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source "$(dirname "$0")/helper.sh"
44
enable_strict_mode
55
cd "$git_root"
66

7-
otp_vsn="${TRAVIS_OTP_RELEASE:-22.3.4}-1"
7+
otp_vsn="${OTP_RELEASE:-24.0}-1"
88
echo "ERLANG/OTP '${otp_vsn}'"
99

1010
docker build \

integration_test/test_add_new_node.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ start_amoc_container amoc-4 -e AMOC_NODES="['amoc@amoc-1']"
77

88
wait_for_healthcheck amoc-4
99

10-
amoc_eval amoc-4 "amoc_controller:get_status()" | contain dummy_scenario running
11-
amoc_eval amoc-4 "amoc_config:get(test)" | contain "test_value"
12-
amoc_eval amoc-4 "dummy_helper:test_amoc_dist()" | contain 'amoc_dist_works_as_expected'
10+
amoc_eval amoc-4 "amoc_controller:get_status()." | contain dummy_scenario running
11+
amoc_eval amoc-4 "binary_to_list(amoc_config:get(test))." | contain "test_value"
12+
amoc_eval amoc-4 "dummy_helper:test_amoc_dist()." | contain 'amoc_dist_works_as_expected'

integration_test/test_docker_image.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ wait_for_healthcheck amoc-1
2222
wait_for_healthcheck amoc-2
2323
wait_for_healthcheck amoc-3
2424

25-
amoc_eval amoc-1 "nodes()" | contain amoc-2 amoc-3
26-
amoc_eval amoc-2 "nodes()" | contain amoc-1 amoc-3
27-
amoc_eval amoc-3 "nodes()" | contain amoc-1 amoc-2
25+
amoc_eval amoc-1 "nodes()." | contain amoc-2 amoc-3
26+
amoc_eval amoc-2 "nodes()." | contain amoc-1 amoc-3
27+
amoc_eval amoc-3 "nodes()." | contain amoc-1 amoc-2
2828

29-
amoc_eval amoc-1 "amoc_scenario:does_scenario_exist(test1)" | contain true
30-
amoc_eval amoc-1 "amoc_scenario:does_scenario_exist(test2)" | contain true
29+
amoc_eval amoc-1 "amoc_scenario:does_scenario_exist(test1)." | contain true
30+
amoc_eval amoc-1 "amoc_scenario:does_scenario_exist(test2)." | contain true
3131

3232
wait_for_metrics {"amoc-1","amoc-2","amoc-3"}".amoc.users.size"

rebar.config

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,24 @@
66
{exometer_core, {git, "https://github.com/esl/exometer_core.git", {branch, "master"}}},
77
{exometer_report_graphite, {git, "https://github.com/esl/exometer_report_graphite.git", {branch, "master"}}},
88
%% when updating amoc_rest version, don't forget to update it at ./doc/http-api.md as well.
9-
{amoc_rest, {git, "https://github.com/esl/amoc_rest.git", {tag, "1.1.0"}}},
9+
{amoc_rest, {git, "https://github.com/esl/amoc_rest.git", {tag, "1.1.1"}}},
1010
{docsh, "0.7.2"}
1111
]}.
1212

1313
{ profiles, [
1414
{test, [
1515
{deps, [
16-
{meck, "0.8.12"},
17-
{proper, "1.3.0"},
18-
{fusco, {git, "https://github.com/esl/fusco.git", {ref, "de08ade"}}}
16+
{meck, "0.9.2"},
17+
{proper, "1.4.0"},
18+
{fusco, "0.1.1"}
1919
]}
2020
]},
2121
{elvis, [{plugins, [{rebar3_lint, "0.1.11"}]}]},
2222
{prod, [
2323
{erl_opts, [{src_dirs, ["src", "scenarios"]}]},
2424
{relx, [
2525
{release, {amoc, git}, [amoc, runtime_tools, compiler, docsh]},
26-
{dev_mode, false},
27-
{include_erts, true},
28-
{include_src, false},
26+
{debug_info, keep},
2927
{extended_start_script, true},
3028
{sys_config, "rel/app.config"}
3129
]}]}

rebar.lock

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{"1.1.0",
1+
{"1.2.0",
22
[{<<"amoc_rest">>,
33
{git,"https://github.com/esl/amoc_rest.git",
4-
{ref,"a6a5f422a4a555dbd67dc5d393d62079f5b75b1e"}},
4+
{ref,"103c3123a8cf0464b9c3f9392af6a396673f67bd"}},
55
0},
6-
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.8.0">>},1},
7-
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.9.1">>},2},
6+
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},1},
7+
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.11.0">>},2},
88
{<<"docsh">>,{pkg,<<"docsh">>,<<"0.7.2">>},0},
99
{<<"exometer_core">>,
1010
{git,"https://github.com/esl/exometer_core.git",
@@ -16,25 +16,35 @@
1616
0},
1717
{<<"getopt">>,{pkg,<<"getopt">>,<<"1.0.1">>},2},
1818
{<<"hut">>,{pkg,<<"hut">>,<<"1.2.1">>},1},
19-
{<<"jesse">>,{pkg,<<"jesse">>,<<"1.5.5">>},1},
20-
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.11.0">>},1},
19+
{<<"jesse">>,{pkg,<<"jesse">>,<<"1.5.6">>},1},
20+
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},1},
2121
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},1},
2222
{<<"providers">>,{pkg,<<"providers">>,<<"1.8.1">>},1},
23-
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},2},
24-
{<<"rfc3339">>,
25-
{git,"https://github.com/talentdeficit/rfc3339.git",
26-
{ref,"31716adecb4b405b1f5ef80b9f3fa50f39b26af8"}},
27-
1}]}.
23+
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},2},
24+
{<<"rfc3339">>,{pkg,<<"rfc3339">>,<<"0.9.0">>},1}]}.
2825
[
2926
{pkg_hash,[
30-
{<<"cowboy">>, <<"F3DC62E35797ECD9AC1B50DB74611193C29815401E53BAC9A5C0577BD7BC667D">>},
31-
{<<"cowlib">>, <<"61A6C7C50CF07FDD24B2F45B89500BB93B6686579B069A89F88CB211E1125C78">>},
27+
{<<"cowboy">>, <<"865DD8B6607E14CF03282E10E934023A1BD8BE6F6BACF921A7E2A96D800CD452">>},
28+
{<<"cowlib">>, <<"0B9FF9C346629256C42EBE1EEB769A83C6CB771A6EE5960BD110AB0B9B872063">>},
3229
{<<"docsh">>, <<"F893D5317A0E14269DD7FE79CF95FB6B9BA23513DA0480EC6E77C73221CAE4F2">>},
3330
{<<"getopt">>, <<"C73A9FA687B217F2FF79F68A3B637711BB1936E712B521D8CE466B29CBF7808A">>},
3431
{<<"hut">>, <<"08D46679523043424870723923971889E8A34D63B2F946A35B46CF921D1236E7">>},
35-
{<<"jesse">>, <<"ECFD2C1634C49052CA907B4DFDE1D1F44B7FD7862D933F4590807E42759B8072">>},
36-
{<<"jsx">>, <<"08154624050333919B4AC1B789667D5F4DB166DC50E190C4D778D1587F102EE0">>},
32+
{<<"jesse">>, <<"593B8CAD26AF3CC0E44C727BD8CBDE56E2B0DE4C8D2738B1C258B6936A40A6A3">>},
33+
{<<"jsx">>, <<"D12516BAA0BB23A59BB35DCCAF02A1BD08243FCBB9EFE24F2D9D056CCFF71268">>},
3734
{<<"parse_trans">>, <<"09765507A3C7590A784615CFD421D101AEC25098D50B89D7AA1D66646BC571C1">>},
3835
{<<"providers">>, <<"70B4197869514344A8A60E2B2A4EF41CA03DEF43CFB1712ECF076A0F3C62F083">>},
39-
{<<"ranch">>, <<"6B1FAB51B49196860B733A49C07604465A47BDB78AA10C1C16A3D199F7F8C881">>}]}
36+
{<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>},
37+
{<<"rfc3339">>, <<"2075653DC9407541C84B1E15F8BDA2ABE95FB17C9694025E079583F2D19C1060">>}]},
38+
{pkg_hash_ext,[
39+
{<<"cowboy">>, <<"2C729F934B4E1AA149AFF882F57C6372C15399A20D54F65C8D67BEF583021BDE">>},
40+
{<<"cowlib">>, <<"2B3E9DA0B21C4565751A6D4901C20D1B4CC25CBB7FD50D91D2AB6DD287BC86A9">>},
41+
{<<"docsh">>, <<"4E7DB461BB07540D2BC3D366B8513F0197712D0495BB85744F367D3815076134">>},
42+
{<<"getopt">>, <<"53E1AB83B9CEB65C9672D3E7A35B8092E9BDC9B3EE80721471A161C10C59959C">>},
43+
{<<"hut">>, <<"953FC447514BAF9CC79FA147D66469243C94DFA1593779614E070C692D0BF0F3">>},
44+
{<<"jesse">>, <<"3F9475B0C5B242E09592604AABB03328501D7E3D8A528173B5A75396EEDB0060">>},
45+
{<<"jsx">>, <<"0C5CC8FDC11B53CC25CF65AC6705AD39E54ECC56D1C22E4ADB8F5A53FB9427F3">>},
46+
{<<"parse_trans">>, <<"17EF63ABDE837AD30680EA7F857DD9E7CED9476CDD7B0394432AF4BFC241B960">>},
47+
{<<"providers">>, <<"E45745ADE9C476A9A469EA0840E418AB19360DC44F01A233304E118A44486BA0">>},
48+
{<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>},
49+
{<<"rfc3339">>, <<"182314DE35C9F4180B22EB5F22916D8D7A799C1109A060C752970273A9332AD6">>}]}
4050
].

0 commit comments

Comments
 (0)