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 ejabberd_s2s module #3762

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

pawlooss1
Copy link
Member

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

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 16, 2022

small_tests_24 / small_tests / 723d58b
Reports root / small


small_tests_25 / small_tests / 723d58b
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 723d58b
Reports root/ big
OK: 3607 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 723d58b
Reports root/ big
OK: 1968 / Failed: 0 / User-skipped: 555 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 723d58b
Reports root/ big
OK: 3607 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 723d58b
Reports root/ big
OK: 3581 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 723d58b
Reports root/ big
OK: 1968 / Failed: 0 / User-skipped: 555 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 723d58b
Reports root/ big
OK: 3981 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 723d58b
Reports root/ big
OK: 3606 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive
{error,{{assertion_failed,assert,is_groupchat_message,
              [<<"Restorable message">>],
              undefined,"undefined"},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {muc_SUITE,wait_for_mam_result,3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4394}]},
     {muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4130}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4126}]},
     {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


internal_mnesia_25 / internal_mnesia / 723d58b
Reports root/ big
OK: 2089 / Failed: 0 / User-skipped: 434 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 723d58b
Reports root/ big
OK: 2429 / Failed: 0 / User-skipped: 429 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 723d58b
Reports root/ big
OK: 3981 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 723d58b
Reports root/ big
OK: 3967 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 723d58b
Reports root/ big
OK: 3980 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

push_integration_SUITE:pubsub_ful:pm_notifications_with_inbox:inbox_msg_unread_count_apns
{error,
  {{assertMatch,
     [{module,push_integration_SUITE},
      {line,662},
      {expression,"Data"},
      {pattern,"# { << \"message-count\" >> := ExpectedCount }"},
      {value,
        #{<<"last-message-body">> => <<"Private message">>,
        <<"last-message-sender">> =>
          <<"alice_inbox_msg_unread_count_apns_2693@localhost">>,
        <<"message-count">> => 1}}]},
   [{push_integration_SUITE,check_notification,2,
      [{file,
         "/home/circleci/project/big_tests/tests/push_integration_SUITE.erl"},
       {line,662}]},
    {push_integration_SUITE,'-inbox_msg_unread_count/3-fun-0-',6,
      [{file,
         "/home/circleci/project/big_tests/tests/push_integration_SUITE.erl"},
       {line,578}]},
    {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


riak_mnesia_24 / riak_mnesia / 723d58b
Reports root/ big
OK: 2268 / Failed: 0 / User-skipped: 422 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 723d58b
Reports root/ big
OK: 3607 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 723d58b
Reports root/ big
OK: 3981 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 81.27% // Head: 81.27% // No change to project coverage 👍

Coverage data is based on head (563764e) compared to base (563764e).
Patch has no changes to coverable lines.

❗ Current head 563764e differs from pull request most recent head 723d58b. Consider uploading reports for the commit 723d58b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3762   +/-   ##
=======================================
  Coverage   81.27%   81.27%           
=======================================
  Files         532      532           
  Lines       34067    34067           
=======================================
  Hits        27689    27689           
  Misses       6378     6378           

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 September 16, 2022 10:09
@pawlooss1 pawlooss1 self-assigned this Sep 16, 2022
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.

But I'm also now thinking, migrating module by module means the reviewer might forget, or not know, if a certain hook had already been build in the backwards compatible way. And if that hook happens not to be touched by tests for whatever bad reason, then we have a risk of merging something invalid. Not saying this is a big risk, I'm just now hesitating what is the least confusing and most incremental way to proceed with the hooks migration. Keep it going per module, but we should keep in mind also what has been adapted already 🤔

@NelsonVides NelsonVides merged commit 8ba1dd9 into master Sep 16, 2022
@NelsonVides NelsonVides deleted the hooks/ejabberd_s2s branch September 16, 2022 11:44
@DenysGonchar
Copy link
Collaborator

I like such small PRs :)

@pawlooss1 pawlooss1 restored the hooks/ejabberd_s2s branch September 16, 2022 12:27
@pawlooss1 pawlooss1 deleted the hooks/ejabberd_s2s branch September 22, 2022 08:54
@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.

5 participants