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_http_upload #3835

Merged
merged 2 commits into from
Nov 7, 2022

Conversation

pawlooss1
Copy link
Member

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

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 31, 2022

small_tests_24 / small_tests / 7bdae88
Reports root / small


small_tests_25 / small_tests / 7bdae88
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 7bdae88
Reports root/ big
OK: 2102 / Failed: 1 / User-skipped: 784 / Auto-skipped: 0

rest_client_SUITE:messages:msg_is_sent_and_delivered_over_sse
{error,{{badmap,{error,timeout}},
    [{erlang,map_get,
         [data,{error,timeout}],
         [{error_info,#{module => erl_erts_errors}}]},
     {rest_client_SUITE,msg_is_sent_and_delivered_over_sse,1,
              [{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
               {line,235}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1292}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1224}]}]}}

Report log


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 7bdae88
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 7bdae88
Reports root/ big
OK: 3968 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 7bdae88
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 7bdae88
Reports root/ big
OK: 2103 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 7bdae88
Reports root/ big
OK: 2239 / Failed: 0 / User-skipped: 648 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 7bdae88
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 7bdae88
Reports root/ big
OK: 4368 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 7bdae88
Reports root/ big
OK: 2581 / Failed: 0 / User-skipped: 641 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 7bdae88
Reports root/ big
OK: 2427 / Failed: 0 / User-skipped: 627 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 7bdae88
Reports root/ big
OK: 4368 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 7bdae88
Reports root/ big
OK: 4354 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 7bdae88
Reports root/ big
OK: 4368 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 7bdae88
Reports root/ big
OK: 2103 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Base: 82.97% // Head: 83.03% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (8d93760) compared to base (0231bf3).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3835      +/-   ##
==========================================
+ Coverage   82.97%   83.03%   +0.05%     
==========================================
  Files         528      528              
  Lines       33922    33922              
==========================================
+ Hits        28148    28168      +20     
+ Misses       5774     5754      -20     
Impacted Files Coverage Δ
src/http_upload/mod_http_upload.erl 97.64% <80.00%> (ø)
src/async_pools/mongoose_aggregator_worker.erl 63.33% <0.00%> (-5.01%) ⬇️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 66.66% <0.00%> (-2.23%) ⬇️
src/ejabberd_c2s.erl 88.95% <0.00%> (-0.38%) ⬇️
src/rdbms/mongoose_rdbms.erl 65.96% <0.00%> (-0.36%) ⬇️
src/mod_roster.erl 78.70% <0.00%> (-0.24%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/pubsub/mod_pubsub.erl 73.23% <0.00%> (+0.18%) ⬆️
src/pubsub/mod_pubsub_db_rdbms.erl 95.34% <0.00%> (+0.25%) ⬆️
src/ejabberd_service.erl 67.53% <0.00%> (+0.64%) ⬆️
... 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 October 31, 2022 08:45
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 minor comment 🤔


%% API
-export([get_urls/5]).

%% mongoose_module_metrics callbacks
-export([config_metrics/1]).

-ignore_xref([behaviour_info/1, disco_local_items/1, process_disco_iq/5, process_iq/5]).
-ignore_xref([behaviour_info/1, process_disco_iq/5, process_iq/5]).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm actually thinking that it is very likely all these ignores can be removed 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

you were right 🙂 xref doesn't complain after I've removed them

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 2, 2022

small_tests_24 / small_tests / 8d93760
Reports root / small


small_tests_25 / small_tests / 8d93760
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8d93760
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 8d93760
Reports root/ big
OK: 2103 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 8d93760
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 8d93760
Reports root/ big
OK: 2103 / Failed: 0 / User-skipped: 784 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 8d93760
Reports root/ big
OK: 3968 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 8d93760
Reports root/ big
OK: 4379 / 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_2575@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2575@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"QxGO6572iE8SJMsdosc78g==">>}],
            [{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,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1224}]}]}}

Report log


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 8d93760
Reports root/ big
OK: 3994 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 8d93760
Reports root/ big
OK: 2239 / Failed: 0 / User-skipped: 648 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 8d93760
Reports root/ big
OK: 2581 / Failed: 0 / User-skipped: 641 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 8d93760
Reports root/ big
OK: 2427 / Failed: 0 / User-skipped: 627 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 8d93760
Reports root/ big
OK: 4354 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 8d93760
Reports root/ big
OK: 4368 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 8d93760
Reports root/ big
OK: 4368 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

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.

LGTM 👍🏽

@NelsonVides NelsonVides merged commit 44f1245 into master Nov 7, 2022
@NelsonVides NelsonVides deleted the hooks/mod_http_upload branch November 7, 2022 11:14
@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