Skip to content

Commit

Permalink
Merge pull request #3186 from esl/refactoring/otp-24.0.2
Browse files Browse the repository at this point in the history
Support OTP 24.X
  • Loading branch information
NelsonVides authored Jul 16, 2021
2 parents fbac330 + bb30d4d commit 0360a60
Show file tree
Hide file tree
Showing 18 changed files with 258 additions and 101 deletions.
80 changes: 67 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,6 @@ workflows:
# ============================================
# ============= IN VM EXECUTORS ==============
# ============= BASE BUILDS =============
- build:
name: otp_21_3
otp_package: 21.3.8.17-1
context: mongooseim-org
filters: *all_tags
- build:
name: otp_22
otp_package: 22.3.4.9-1
Expand All @@ -647,13 +642,18 @@ workflows:
otp_package: 23.0.3-1
context: mongooseim-org
filters: *all_tags
- build:
name: otp_24
otp_package: 24.0.2-1
context: mongooseim-org
filters: *all_tags
# ============= SMALL TESTS =============
- small_tests:
name: small_tests_21_3
otp_package: 21.3.8.17-1
name: small_tests_24
otp_package: 24.0.2-1
context: mongooseim-org
requires:
- otp_21_3
- otp_24
filters: *all_tags
- small_tests:
name: small_tests_22
Expand Down Expand Up @@ -738,15 +738,69 @@ workflows:
requires:
- otp_22
filters: *all_tags
# ============= 2 VERSIONS OLDER TESTS =============
- big_tests:
name: ldap_mnesia_21
otp_package: 21.3.8.17-1
name: pgsql_mnesia_22
otp_package: 22.3.4.9-1
preset: pgsql_mnesia
db: pgsql
context: mongooseim-org
requires:
- otp_22
filters: *all_tags
# ============= MOST RECENT VERSION TESTS OTP 24 =============
- big_tests:
name: ldap_mnesia_24
otp_package: 24.0.2-1
preset: ldap_mnesia
db: mnesia
context: mongooseim-org
requires:
- otp_21_3
- otp_24
filters: *all_tags
- big_tests:
name: mysql_redis_24
otp_package: 24.0.2-1
preset: mysql_redis
db: mysql
context: mongooseim-org
requires:
- otp_24
filters: *all_tags
- big_tests:
name: mssql_mnesia_24
otp_package: 24.0.2-1
preset: odbc_mssql_mnesia
db: mssql
context: mongooseim-org
requires:
- otp_24
filters: *all_tags
- big_tests:
name: elasticsearch_and_cassandra_24
otp_package: 24.0.2-1
preset: elasticsearch_and_cassandra_mnesia
db: "elasticsearch cassandra"
context: mongooseim-org
requires:
- otp_24
filters: *all_tags
- big_tests:
name: riak_mnesia_24
otp_package: 24.0.2-1
preset: riak_mnesia
db: riak
context: mongooseim-org
requires:
- otp_24
filters: *all_tags
- big_tests:
name: pgsql_mnesia_24
otp_package: 24.0.2-1
preset: pgsql_mnesia
db: pgsql
context: mongooseim-org
requires:
- otp_24
filters: *all_tags
# ============= DOCKER IMAGE BUILD & UPLOAD =============
- docker_image:
Expand All @@ -764,6 +818,6 @@ workflows:
- dialyzer
- xref
- small_tests_22
- small_tests_21_3
- small_tests_23
- small_tests_24
filters: *all_tags
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: small_tests on OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['23.0.3', '22.3']
otp: ['23.0.3', '22.3', '24.0.2']
runs-on: ubuntu-20.04
env:
PRESET: 'small_tests'
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
matrix:
preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia,
ldap_mnesia, riak_mnesia, elasticsearch_and_cassandra_mnesia]
otp: ['23.0.3']
otp: ['22.3', '23.0.3', '24.0.2']
runs-on: ubuntu-20.04
env:
PRESET: ${{matrix.preset}}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
name: dialyzer on OTP ${{matrix.otp}}
strategy:
matrix:
otp: [ '23.0.3']
otp: ['24.0.2']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand All @@ -113,7 +113,7 @@ jobs:
name: xref on OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['23.0.3']
otp: ['24.0.2']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 6 additions & 4 deletions big_tests/rebar.config
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{erl_opts, [debug_info,
{i, ["include"]}]}.
{i, ["include"]},
{platform_define, "^(20)", fun_stacktrace}]}.

{require_min_otp_vsn, "21"}.

{src_dirs, ["src", "tests"]}.

%% We use https:// instead of git://
{deps, [
{lager, "3.9.2"},
{base16, {git, "https://github.com/esl/base16.git", {tag, "1.1.0"}}},
{bbmustache, "1.10.0"},
{erlsh, {git, "https://github.com/proger/erlsh.git", {ref, "4e8a107"}}},
{jiffy, "1.0.5"},
{proper, "1.3.0"},
{proper, "1.4.0"},
{escalus, {git, "https://github.com/esl/escalus.git", {branch, "master"}}},
{gen_fsm_compat, "0.3.0"},
{cowboy, "2.7.0"},
{cowboy, "2.9.0"},
{csv, "3.0.3", {pkg, csve}},
{shotgun, "0.4.1"},
{amqp_client, "3.8.4"},
{amqp_client, "3.8.14"},
{esip, "1.0.33"},
{ibrowse, "4.4.1"},
{chatterbox, "0.8.0"},
Expand Down
63 changes: 46 additions & 17 deletions big_tests/rebar.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{"1.1.0",
[{<<"amqp_client">>,{pkg,<<"amqp_client">>,<<"3.8.4">>},0},
{"1.2.0",
[{<<"amqp_client">>,{pkg,<<"amqp_client">>,<<"3.8.14">>},0},
{<<"base16">>,
{git,"https://github.com/esl/base16.git",
{ref,"3e046e9667a5e8579cd9004e00c6e2537f5e044f"}},
0},
{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.10.0">>},0},
{<<"chatterbox">>,{pkg,<<"chatterbox">>,<<"0.8.0">>},0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.7.0">>},0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},0},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.8.0">>},1},
{<<"credentials_obfuscation">>,
{pkg,<<"credentials_obfuscation">>,<<"2.0.0">>},
{pkg,<<"credentials_obfuscation">>,<<"2.4.0">>},
2},
{<<"csv">>,{pkg,<<"csve">>,<<"3.0.3">>},0},
{<<"erlsh">>,
Expand All @@ -35,7 +35,7 @@
{ref,"de08adef32d12f0984d6d1c6fec28be207db2e7e"}},
1},
{<<"gen_fsm_compat">>,{pkg,<<"gen_fsm_compat">>,<<"0.3.0">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},3},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"gun">>,{pkg,<<"gun">>,<<"1.3.2">>},1},
{<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.2.3">>},1},
{<<"ibrowse">>,{pkg,<<"ibrowse">>,<<"4.4.1">>},0},
Expand All @@ -45,13 +45,13 @@
0},
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.0.5">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.9.0">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.8.0">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.2">>},0},
{<<"meck">>,{pkg,<<"meck">>,<<"0.8.13">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.18">>},1},
{<<"proper">>,{pkg,<<"proper">>,<<"1.3.0">>},0},
{<<"proper">>,{pkg,<<"proper">>,<<"1.4.0">>},0},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.8.0">>},2},
{<<"rabbit_common">>,{pkg,<<"rabbit_common">>,<<"3.8.4">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},1},
{<<"rabbit_common">>,{pkg,<<"rabbit_common">>,<<"3.8.14">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},1},
{<<"recon">>,{pkg,<<"recon">>,<<"2.5.0">>},2},
{<<"shotgun">>,{pkg,<<"shotgun">>,<<"0.4.1">>},0},
{<<"stringprep">>,
Expand All @@ -63,12 +63,12 @@
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"3.2.0">>},1}]}.
[
{pkg_hash,[
{<<"amqp_client">>, <<"31F1DF5495D452F321C0275C7263A18C3BA38E1DA486CFC7271BE84F4A84AF01">>},
{<<"amqp_client">>, <<"7569517AEFB47E0D1C41BCA2F4768DC8A2D88487DAF7819FECCA0D78943F293C">>},
{<<"bbmustache">>, <<"DDC927463F0E95D66CDAC889153AF08015D609124D6D79006C248AD2DE7F6ECD">>},
{<<"chatterbox">>, <<"AF8B95EF45D5B9783B67ECEA1E23A4CCE058FCE5E950B42F84F4DF8BC7620D0B">>},
{<<"cowboy">>, <<"91ED100138A764355F43316B1D23D7FF6BDB0DE4EA618CB5D8677C93A7A2F115">>},
{<<"cowboy">>, <<"865DD8B6607E14CF03282E10E934023A1BD8BE6F6BACF921A7E2A96D800CD452">>},
{<<"cowlib">>, <<"FD0FF1787DB84AC415B8211573E9A30A3EBE71B5CBFF7F720089972B2319C8A4">>},
{<<"credentials_obfuscation">>, <<"65425424414B91F85FEB2C8F7E09AF65E91B6E311842E4CA07F6AABE20F5E58C">>},
{<<"credentials_obfuscation">>, <<"9FB57683B84899CA3546B384E59AB5D3054A9F334EBA50D74C82CD0AE82DD6CA">>},
{<<"csv">>, <<"69E7D9B3FDC72016644368762C6A3E6CBFEB85BCCADBF1BD99AB6C827E360E04">>},
{<<"esip">>, <<"D3C78BFB291F52E11D6955ECB29CB194A55EB0C4CE7ECF407619698005B815E3">>},
{<<"fast_scram">>, <<"1F8F467D34374D00CE4AB8D6F78430EA8ADCCD2DA6D5BA0069B9EA8A1CAC6DE1">>},
Expand All @@ -79,16 +79,45 @@
{<<"ibrowse">>, <<"2B7D0637B0F8B9B4182DE4BD0F2E826A4DA2C9B04898B6E15659BA921A8D6EC2">>},
{<<"jiffy">>, <<"A69B58FAF7123534C20E1B0B7AE97AC52079CA02ED4B6989B4B380179CD63A54">>},
{<<"jsx">>, <<"D2F6E5F069C00266CAD52FB15D87C428579EA4D7D73A33669E12679E203329DD">>},
{<<"lager">>, <<"3402B9A7E473680CA179FC2F1D827CAB88DD37DD1E6113090C6F45EF05228A1C">>},
{<<"lager">>, <<"4CAB289120EB24964E3886BD22323CB5FEFE4510C076992A23AD18CF85413D8C">>},
{<<"meck">>, <<"FFEDB39F99B0B99703B8601C6F17C7F76313EE12DE6B646E671E3188401F7866">>},
{<<"p1_utils">>, <<"3FE224DE5B2E190D730A3C5DA9D6E8540C96484CF4B4692921D1E28F0C32B01C">>},
{<<"proper">>, <<"C1ACD51C51DA17A2FE91D7A6FC6A0C25A6A9849D8DC77093533109D1218D8457">>},
{<<"proper">>, <<"89A44B8C39D28BB9B4BE8E4D715D534905B325470F2E0EC5E004D12484A79434">>},
{<<"quickrand">>, <<"E47CE597FF067385FF5836C8C7706AC7F8AA7B47DD90C6417E05B64696F872FA">>},
{<<"rabbit_common">>, <<"CC6BF7F8543F6C4953187C05BC6ADE62455372FAF62FC40A9D1EFFD221218FC6">>},
{<<"ranch">>, <<"6B1FAB51B49196860B733A49C07604465A47BDB78AA10C1C16A3D199F7F8C881">>},
{<<"rabbit_common">>, <<"CC1604891295CD82F34597F1526AC611EA7B6A0E57B3DD79B41CB4224BCC6EC5">>},
{<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>},
{<<"recon">>, <<"2F7FCBEC2C35034BADE2F9717F77059DC54EB4E929A3049CA7BA6775C0BD66CD">>},
{<<"shotgun">>, <<"22384C6D61DB053F466A425052F1648E1FA15FC2DDFDD9040404089A7C90D6AD">>},
{<<"stun">>, <<"C1BF6C3EF4B6304C423541B2734ADCFA46E265D96119B14F2A390DA7119D0A42">>},
{<<"uuid">>, <<"280014F8FF57FCE36EE6E91C3ECF21CBFCE78AAE9854C09597BB4C11E27B66D6">>},
{<<"worker_pool">>, <<"54DD752BA4CA4B702124C45803AA958B36BCE77D683B87886606F1AADA3E124D">>}]}
{<<"worker_pool">>, <<"54DD752BA4CA4B702124C45803AA958B36BCE77D683B87886606F1AADA3E124D">>}]},
{pkg_hash_ext,[
{<<"amqp_client">>, <<"E5BA3AC18ABBE34A1D990A6BCAC25633DC7061AB8F8D101C7DCFF97F49F4C523">>},
{<<"bbmustache">>, <<"43EFFA3FD4BB9523157AF5A9E2276C493495B8459FC8737144AA186CB13CE2EE">>},
{<<"chatterbox">>, <<"70095D965FFE37509C5FDFA83CE28E31879A3E59C8438288989FC92112539423">>},
{<<"cowboy">>, <<"2C729F934B4E1AA149AFF882F57C6372C15399A20D54F65C8D67BEF583021BDE">>},
{<<"cowlib">>, <<"79F954A7021B302186A950A32869DBC185523D99D3E44CE430CD1F3289F41ED4">>},
{<<"credentials_obfuscation">>, <<"D28A89830E30698B075DE9A4DBE683A20685C6BED1E3B7DF744A0C06E6FF200A">>},
{<<"csv">>, <<"741D1A55AABADAA3E0FE13051050101A73E90C4570B9F9403A939D9546813521">>},
{<<"esip">>, <<"D09ADDD003DBE078832A2AF6D72367B374A6C495F35FBE54B09BFF338F4803BE">>},
{<<"fast_scram">>, <<"9401856A0D4FE620F8EC24C893689D485AE49FBD3F503CF5FCD9D1E69935C511">>},
{<<"gen_fsm_compat">>, <<"7153D11BAD328933D4B24E663D8CEC52874E14176C7FB392FA1FF768B17460D9">>},
{<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>},
{<<"gun">>, <<"BA323F0A5FD8ABAC379A3E1FE6D8CE570C4A12C7FD1C68F4994B53447918E462">>},
{<<"hpack">>, <<"06F580167C4B8B8A6429040DF36CC93BBA6D571FAEAEC1B28816523379CBB23A">>},
{<<"ibrowse">>, <<"1E86C591DBC6D270632625534986BECA30813AF7CE784E742E5FC38E342C29B3">>},
{<<"jiffy">>, <<"B617A53F46AE84F20D0C38951367DC947A2CF8CFF922AA5C6AC6B64B8B052289">>},
{<<"jsx">>, <<"8EE1DB1CABAFDD578A2776A6AAAE87C2A8CE54B47B59E9EC7DAB5D7EB71CD8DC">>},
{<<"lager">>, <<"7F904D9E87A8CB7E66156ED31768D1C8E26EBA1D54F4BC85B1AA4AC1F6340C28">>},
{<<"meck">>, <<"D34F013C156DB51AD57CC556891B9720E6A1C1DF5FE2E15AF999C84D6CEBEB1A">>},
{<<"p1_utils">>, <<"1FC8773A71A15553B179C986B22FBEEAD19B28FE486C332D4929700FFEB71F88">>},
{<<"proper">>, <<"18285842185BD33EFBDA97D134A5CB5A0884384DB36119FEE0E3CFA488568CBB">>},
{<<"quickrand">>, <<"7FFADCF851FB4D1F7BC2952E955623BE63F9C4A6B965FD207CC558D5AEDBB6F9">>},
{<<"rabbit_common">>, <<"27409E425413CDD3FC2C077CF08226C4A307D56B1467883F26AB3789B2E106D0">>},
{<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>},
{<<"recon">>, <<"72F3840FEDD94F06315C523F6CECF5B4827233BED7AE3FE135B2A0EBEAB5E196">>},
{<<"shotgun">>, <<"4F3C3F720B979C051DE11ABABBA9410445AF11085CF82E1ED02A545607A062A4">>},
{<<"stun">>, <<"4178CF7514DD1DF05502199B6D68ED8DC568D8CFA9DBAD36A890843431190AAC">>},
{<<"uuid">>, <<"08A59B19A93F0F319B7609516DCE33D2366FA24429EF097D107B7D6998D7E9CC">>},
{<<"worker_pool">>, <<"769F448D524D371D57FF2F836EC4FAC0BD55A789010809A5442666FDD8853F8C">>}]}
].
12 changes: 12 additions & 0 deletions include/backward_compatible.hrl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-ifdef(OTP_RELEASE).
-if(?OTP_RELEASE >= 23).
-define(PG_JOIN(Group, PID), pg:join(Group, PID)).
-define(PG_GET_MEMBERS(Group), pg:get_members(Group)).
-else.
-define(PG_JOIN(Group, PID), pg2:create(Group), pg2:join(Group, PID)).
-define(PG_GET_MEMBERS(Group), pg2:get_members(Group)).
-endif.
-else.
-define(PG_JOIN(Group, PID), pg2:create(Group), pg2:join(Group, PID)).
-define(PG_GET_MEMBERS(Group), pg2:get_members(Group)).
-endif.
28 changes: 13 additions & 15 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{erl_opts, [debug_info,
{i, ["include"]},
{d, xml_nif}]}.
{d, xml_nif},
{platform_define, "^(20)", fun_stacktrace}]}.

%% For behaviour info
{erl_first_files, [
Expand Down Expand Up @@ -33,18 +34,14 @@
mod_roster_backend, mod_routing_machine,
mod_shared_roster, mod_smart_markers_backend, mongoose_rdbms_type,
%% Deprecated functions
{ssl, ssl_accept, 2}, % use ssl:handshake/2 instead
{crypto, rand_uniform, 2},
{ranch, start_listener, 6},
{ranch, accept_ack, 1},
{mongoose_lib, deprecated_logging, 1},
{crypto, hmac, 3},
{http_uri, parse, 1},
{http_uri, scheme_defaults, 0},
{pg2, get_members, 1},
{pg2, create, 1},
{pg2, join, 2},
{sys, get_debug, 3}
{sys, get_debug, 3},
{httpd_util, integer_to_hexlist, 1}
]}.

{port_specs,
Expand All @@ -64,8 +61,8 @@
[
{base16, "2.0.0"},
{exml, "3.0.5", {pkg, hexml}},
{lager, "3.8.0"}, % We're keeping this to override the dependencies
{cowboy, "2.7.0"},
{lager, "3.9.2"}, % We're keeping this to override the dependencies
{cowboy, "2.9.0"},
{exometer_core, {git, "https://github.com/esl/exometer_core.git", {branch, "master"}}},
{exometer_report_graphite, {git, "https://github.com/esl/exometer_report_graphite.git", {branch, "master"}}},
{exometer_report_statsd, {git, "https://github.com/esl/exometer_report_statsd.git", {branch, "master"}}},
Expand All @@ -83,28 +80,29 @@
{riakc, {git, "https://github.com/basho/riak-erlang-client.git", {branch, "2.5.3"}}},
{cqerl, {git, "https://github.com/esl/cqerl.git", {branch, "master"}}},
{mysql, "1.6.0"},
{epgsql, "4.4.0"},
{epgsql, "4.5.0"},
{eodbc, {git, "https://github.com/arcusfelis/eodbc.git", {branch, "master"}}},
{tirerl, "1.1.0"},

{cache_tab, "1.0.22"},
{cache_tab, "1.0.28"},
{jid, {git, "https://github.com/esl/mongoose_jid.git", {branch, "master"}}},

{proper, "1.3.0"},
{proper, "1.4.0"},
{meck, "0.8.13"},

{pa, {git, "https://github.com/erszcz/pa.git", {branch, "master"}}},
{bbmustache, "1.10.0"},
{recon, "2.5.1"},
{erlcloud, "3.3.1"},
{jwerl, "1.1.0"},
{erlcloud, "3.5.5"},
%% MR of jwerl - https://gitlab.com/glejeune/jwerl/-/merge_requests/13
{jwerl, {git, "https://gitlab.com/vkatsuba/jwerl.git", {branch, "refactoring/otp-24"}}},
{csv, {git, "https://github.com/bszaf/csv.git", {branch, "master"}}},
%% Do not upgrade cpool to version 0.1.1, it has bugs
{cpool, "0.1.0"},
{observer_cli, "1.5.4"},
{nkpacket, {git, "https://github.com/michalwski/nkpacket.git", {ref, "f7c5349"}}},
{nksip, {git, "https://github.com/NetComposer/nksip.git", {ref, "1a29ef3"}}},
{amqp_client, "3.8.4"},
{amqp_client, "3.8.14"},
{eredis, "1.2.0"},
{gen_fsm_compat, "0.3.0"},
{erlang_pmp, "0.1.1"},
Expand Down
Loading

0 comments on commit 0360a60

Please sign in to comment.