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

Refactored hook handlers in mod_disco #3847

Merged
merged 1 commit into from
Nov 9, 2022
Merged

Conversation

pawlooss1
Copy link
Member

This PR changes all hook handlers in mod_disco module to gen_hook format.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 8, 2022

small_tests_24 / small_tests / b4f7bbd
Reports root / small


small_tests_25 / small_tests / b4f7bbd
Reports root / small


ldap_mnesia_24 / ldap_mnesia / b4f7bbd
Reports root/ big
OK: 2118 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / b4f7bbd
Reports root/ big
OK: 4009 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / b4f7bbd
Reports root/ big
OK: 4009 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / b4f7bbd
Reports root/ big
OK: 2118 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / b4f7bbd
Reports root/ big
OK: 3983 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / b4f7bbd
Reports root/ big
OK: 2254 / Failed: 0 / User-skipped: 648 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / b4f7bbd
Reports root/ big
OK: 4009 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / b4f7bbd
Reports root/ big
OK: 4383 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / b4f7bbd
Reports root/ big
OK: 2596 / Failed: 0 / User-skipped: 641 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / b4f7bbd
Reports root/ big
OK: 2442 / Failed: 0 / User-skipped: 627 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / b4f7bbd
Reports root/ big
OK: 4383 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / b4f7bbd
Reports root/ big
OK: 4369 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / b4f7bbd
Reports root/ big
OK: 4394 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2613@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2613@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"Eo55A7FpBkOITcMwYQ5+WA==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log

@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Base: 83.08% // Head: 83.11% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (caee162) compared to base (145669a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3847      +/-   ##
==========================================
+ Coverage   83.08%   83.11%   +0.02%     
==========================================
  Files         534      534              
  Lines       34060    34058       -2     
==========================================
+ Hits        28300    28306       +6     
+ Misses       5760     5752       -8     
Impacted Files Coverage Δ
src/mod_disco.erl 87.61% <100.00%> (-0.24%) ⬇️
src/ejabberd.erl 45.00% <0.00%> (-10.00%) ⬇️
src/pubsub/mod_pubsub.erl 73.04% <0.00%> (-0.19%) ⬇️
src/ejabberd_c2s.erl 88.95% <0.00%> (-0.08%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/mod_muc.erl 74.47% <0.00%> (+0.23%) ⬆️
src/rdbms/mongoose_rdbms.erl 67.01% <0.00%> (+0.70%) ⬆️
src/muc_light/mod_muc_light_db_mnesia.erl 92.63% <0.00%> (+1.05%) ⬆️
src/mam/mod_mam_elasticsearch_arch.erl 88.39% <0.00%> (+1.78%) ⬆️
src/pubsub/node_pep.erl 79.62% <0.00%> (+1.85%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pawlooss1 pawlooss1 marked this pull request as ready for review November 8, 2022 11:23
Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one indentation broken and it's ready to merge 👌🏽

Acc :: mongoose_disco:info_acc(),
Params :: map(),
Extra :: map().
disco_info(Acc = #{host_type := HostType, module := Module, node := <<>>}, _, _) ->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... all these handlers expose the host_type twice, once here and once in the extra param, seems like redundancy to correct for the future 🤔

src/mod_disco.erl Outdated Show resolved Hide resolved
@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 9, 2022

small_tests_24 / small_tests / caee162
Reports root / small


small_tests_25 / small_tests / caee162
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / caee162
Reports root/ big
OK: 4015 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / caee162
Reports root/ big
OK: 2118 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / caee162
Reports root/ big
OK: 4015 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / caee162
Reports root/ big
OK: 2118 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / caee162
Reports root/ big
OK: 3989 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / caee162
Reports root/ big
OK: 4389 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / caee162
Reports root/ big
OK: 2254 / Failed: 0 / User-skipped: 648 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / caee162
Reports root/ big
OK: 4015 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / caee162
Reports root/ big
OK: 2596 / Failed: 0 / User-skipped: 641 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / caee162
Reports root/ big
OK: 4389 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / caee162
Reports root/ big
OK: 2442 / Failed: 0 / User-skipped: 627 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / caee162
Reports root/ big
OK: 4375 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / caee162
Reports root/ big
OK: 4389 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@NelsonVides NelsonVides merged commit 316cc93 into master Nov 9, 2022
@NelsonVides NelsonVides deleted the hooks/mod_disco branch November 9, 2022 14:11
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants