-
Notifications
You must be signed in to change notification settings - Fork 428
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
Hosttypyfy wpool #3170
Hosttypyfy wpool #3170
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3170 +/- ##
===========================================
- Coverage 79.92% 59.33% -20.59%
===========================================
Files 396 396
Lines 32335 32347 +12
===========================================
- Hits 25843 19194 -6649
- Misses 6492 13153 +6661
Continue to review full report at Codecov.
|
7c6f4f2
to
22c3d6e
Compare
small_tests_21_3 / small_tests / 22c3d6e dynamic_domains / pgsql_mnesia / 22c3d6e small_tests_22 / small_tests / 22c3d6e small_tests_23 / small_tests / 22c3d6e ldap_mnesia_21 / ldap_mnesia / 22c3d6e internal_mnesia / internal_mnesia / 22c3d6e dynamic_domains_SUITE:with_mod_dynamic_domains_test:packet_handling_for_subdomain{error,
{{badrpc,
{'EXIT',
{timeout,
[{meck_proc,wait,6,
[{file,
"/home/circleci/app/_build/default/lib/meck/src/meck_proc.erl"},
{line,171}]},
{meck,wait,5,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
meck,wait,
[3,mod_dynamic_domains_test,process_packet,5,500]],
[{file,"/home/circleci/app/big_tests/tests/distributed_helper.erl"},
{line,117}]},
{dynamic_domains_SUITE,'-packet_handling_for_subdomain/1-fun-3-',1,
[{file,
"/home/circleci/app/big_tests/tests/dynamic_domains_SUITE.erl"},
{line,113}]},
{escalus_story,story,4,
[{file,
"/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1754}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1263}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1195}]}]}} ldap_mnesia_23 / ldap_mnesia / 22c3d6e ldap_mnesia_22 / ldap_mnesia / 22c3d6e elasticsearch_and_cassandra / elasticsearch_and_cassandra_mnesia / 22c3d6e pgsql_mnesia / pgsql_mnesia / 22c3d6e mysql_redis / mysql_redis / 22c3d6e mssql_mnesia / odbc_mssql_mnesia / 22c3d6e riak_mnesia / riak_mnesia / 22c3d6e internal_mnesia / internal_mnesia / 22c3d6e pgsql_mnesia / pgsql_mnesia / 22c3d6e mssql_mnesia / odbc_mssql_mnesia / 22c3d6e |
rebar.config
Outdated
@@ -71,7 +73,7 @@ | |||
{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"}}}, | |||
{nksip, {git, "https://github.com/arcusfelis/nksip.git", {branch, "mu-fix-types-1a29ef3"}}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please submit PR with these fixes to the original repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use nksip from 5 years ago:
commit 1a29ef3e112ee0a8d8ac53bd6963ccc8f7879343
Author: Carlos Gonzalez <carlosj.gf@gmail.com>
Date: Fri Nov 4 20:13:40 2016 +0100
Fixed license
We would be a bit late with this PR
|
||
%% Used to supress opaque check of dialyzer | ||
-spec identity(any()) -> any(). | ||
identity(X) -> X. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why we need it. please, illustrate it on some example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without it you will get error that opaque type is used in mim code, while tuple is expected.
src/jingle_sip/mod_jingle_sip.erl
Outdated
@@ -284,6 +271,28 @@ translate_to_sip(<<"session-terminate">>, Jingle, Acc) -> | |||
{error, item_not_found} | |||
end. | |||
|
|||
%% There is some mess with types hapenning in nksip_uac:invite/3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't you fix it in your fork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nooo, there are still weird types in nksip.
I've fixed one or two errors only.
src/mam/mod_mam_utils.erl
Outdated
@@ -138,6 +138,8 @@ rsm_ns_binary() -> <<"http://jabber.org/protocol/rsm">>. | |||
-type archive_behaviour() :: mod_mam:archive_behaviour(). | |||
-type archive_behaviour_bin() :: binary(). % `<<"roster">> | <<"always">> | <<"never">>'. | |||
|
|||
%% calendar:rfc3339_string() type is not exported | |||
-type rfc3339_string() :: [byte(), ...]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put this type in some generic module (e.g. mongooseim
)?
src/mod_stream_management.erl
Outdated
-type smid() :: base64:ascii_binary(). | ||
|
||
%% base64:ascii_binary() type is not exported | ||
-type ascii_binary() :: binary(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same question, should we put this type in some generic module (e.g. mongooseim)?
src/mongoose_redis.erl
Outdated
@@ -7,6 +7,7 @@ | |||
-module(mongoose_redis). | |||
-author("bartlomiej.gorny@erlang-solutions.com"). | |||
-include("mongoose.hrl"). | |||
-include_lib("eredis/include/eredis.hrl"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is return_value()
defined in eredis.hrl
, it seems to be a wrong approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
say it to eredis authors
rebar.config
Outdated
@@ -178,7 +180,24 @@ | |||
{override, jwerl, [{plugins, [rebar3_elixir, rebar3_hex]}]} | |||
]}. | |||
|
|||
{dialyzer, [{plt_extra_apps, [jid, cowboy, lasse, p1_utils, ranch, gen_fsm_compat, epgsql]}]}. | |||
{dialyzer, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job, but probably it's better to have it in a separate PR. it's just a wish for the future, no need to make a split of this one.
src/jlib.erl
Outdated
@@ -78,12 +78,16 @@ | |||
-type rsm_in() :: #rsm_in{}. | |||
-type rsm_out() :: #rsm_out{}. | |||
|
|||
%% calendar:rfc3339_string() type is not exported | |||
-type rfc3339_string() :: [byte(), ...]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put this type in some generic module (e.g. mongooseim)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks very good, I'd like to recheck just a few minor things before merging it.
Also that would be nice to run some integration tests with host-type specific pools. |
22c3d6e
to
91f57d2
Compare
small_tests_21_3 / small_tests / 91f57d2 small_tests_22 / small_tests / 91f57d2 dynamic_domains / pgsql_mnesia / 91f57d2 small_tests_23 / small_tests / 91f57d2 ldap_mnesia_21 / ldap_mnesia / 91f57d2 ldap_mnesia_22 / ldap_mnesia / 91f57d2 internal_mnesia / internal_mnesia / 91f57d2 ldap_mnesia_23 / ldap_mnesia / 91f57d2 elasticsearch_and_cassandra / elasticsearch_and_cassandra_mnesia / 91f57d2 mssql_mnesia / odbc_mssql_mnesia / 91f57d2 pgsql_mnesia / pgsql_mnesia / 91f57d2 mysql_redis / mysql_redis / 91f57d2 connect_SUITE:just_tls:feature_order:auth_compression_bind_session{error,
{{badmatch,
{error,
{connection_step_failed,
{{escalus_session,maybe_use_compression},
{client,
<<"secure_joe_auth_compression_bind_session_48.697942@localhost">>,
escalus_tcp,<0.13384.0>,undefined,
[{username,
<<"secure_joe_auth_compression_bind_session_48.697942">>},
{server,<<"localhost">>},
{password,<<"break_me">>},
{compression,<<"zlib">>},
{starttls,required},
{host,<<"localhost">>},
{stream_id,<<"60841b22773b84ab">>}]},
[{compression,[<<"zlib">>]},
{starttls,false},
{stream_management,true},
{advanced_message_processing,true},
{client_state_indication,false},
{sasl_mechanisms,[<<"SCRAM-SHA-256">>,<<"PLAIN">>]},
{caps,undefined}]},
{timeout,stream_start}}}},
[{connect_SUITE,auth_compression_bind_session,1,
[{file,"/home/circleci/app/big_tests/tests/connect_SUITE.erl"},
{line,517}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1754}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1263}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1195}]}]}} riak_mnesia / riak_mnesia / 91f57d2 mssql_mnesia / odbc_mssql_mnesia / 91f57d2 |
This comment has been minimized.
This comment has been minimized.
318756d
to
91f57d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like the new types, good work!
@@ -74,26 +74,31 @@ | |||
%%-------------------------------------------------------------------- | |||
%% gen_mod callbacks | |||
%%-------------------------------------------------------------------- | |||
-spec start(Host :: jid:server(), Opts :: list()) -> any(). | |||
-spec start(HostType :: mongooseim:host_type(), Opts :: gen_mod:module_opts()) -> any(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, I think that variable names should agree between the spec and the implementation. We could either change to HostType
or leave Host
in both places.
Proposed changes include: