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

Support dynamic domains in mod_sic #3258

Merged
merged 6 commits into from
Sep 10, 2021

Conversation

Premwoik
Copy link
Contributor

This PR adds support for dynamic domains in mod_sic and adapts tests.

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #3258 (6755787) into master (c86e7c7) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3258      +/-   ##
==========================================
- Coverage   80.33%   80.33%   -0.01%     
==========================================
  Files         398      398              
  Lines       32566    32570       +4     
==========================================
+ Hits        26163    26164       +1     
- Misses       6403     6406       +3     
Impacted Files Coverage Δ
src/mod_sic.erl 77.77% <80.00%> (+6.34%) ⬆️
src/ejabberd.erl 45.00% <0.00%> (-10.00%) ⬇️
src/mod_last_rdbms.erl 91.66% <0.00%> (-4.17%) ⬇️
src/domain/mongoose_domain_loader.erl 75.47% <0.00%> (-1.89%) ⬇️
src/mod_last.erl 86.36% <0.00%> (-1.52%) ⬇️
src/privacy/mod_privacy_rdbms.erl 80.51% <0.00%> (-1.03%) ⬇️
src/rdbms/mongoose_rdbms.erl 60.88% <0.00%> (-0.81%) ⬇️
src/ejabberd_sm.erl 84.26% <0.00%> (-0.33%) ⬇️
src/ejabberd_s2s_out.erl 62.41% <0.00%> (+0.22%) ⬆️
src/pubsub/mod_pubsub_db_mnesia.erl 92.85% <0.00%> (+0.42%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c86e7c7...6755787. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 10, 2021

small_tests_24 / small_tests / 90b7e48
Reports root / small


internal_mnesia_24 / internal_mnesia / 90b7e48
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 290 / Auto-skipped: 0


dynamic_domains_24 / pgsql_mnesia / 90b7e48
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / 90b7e48
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


small_tests_22 / small_tests / 90b7e48
Reports root / small


small_tests_23 / small_tests / 90b7e48
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 90b7e48
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 90b7e48
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 90b7e48
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_22 / ldap_mnesia / 90b7e48
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / 90b7e48
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 90b7e48
Reports root/ big
OK: 1892 / Failed: 0 / User-skipped: 286 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 90b7e48
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 90b7e48
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 90b7e48
Reports root/ big
OK: 3074 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 90b7e48
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 289 / Auto-skipped: 0

@Premwoik Premwoik marked this pull request as ready for review September 10, 2021 08:09
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

The code looks good in general, I have one minor comment.

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

mongoose-im commented Sep 10, 2021

small_tests_24 / small_tests / 2108f0d
Reports root / small


internal_mnesia_24 / internal_mnesia / 2108f0d
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 290 / Auto-skipped: 0


dynamic_domains_24 / pgsql_mnesia / 2108f0d
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


small_tests_22 / small_tests / 2108f0d
Reports root / small


dynamic_domains_23 / pgsql_mnesia / 2108f0d
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


small_tests_23 / small_tests / 2108f0d
Reports root / small


ldap_mnesia_22 / ldap_mnesia / 2108f0d
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 2108f0d
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 2108f0d
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 2108f0d
Reports root/ big
OK: 3074 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / 2108f0d
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 2108f0d
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 2108f0d
Reports root/ big
OK: 3102 / Failed: 1 / User-skipped: 184 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_34.762886@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_34.762886@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"fien/DvFN2n5jaq6Jb3YRg==">>}],
            [{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/app/big_tests/tests/pep_SUITE.erl"},
       {line,382}]},
    {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,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


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 2108f0d
Reports root/ big
OK: 1892 / Failed: 0 / User-skipped: 286 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 2108f0d
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 2108f0d
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 289 / Auto-skipped: 0

src/mod_sic.erl Outdated Show resolved Hide resolved
Co-authored-by: Nelson Vides <[email protected]>
@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 10, 2021

small_tests_24 / small_tests / 6755787
Reports root / small


internal_mnesia_24 / internal_mnesia / 6755787
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 290 / Auto-skipped: 0


small_tests_22 / small_tests / 6755787
Reports root / small


dynamic_domains_24 / pgsql_mnesia / 6755787
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


small_tests_23 / small_tests / 6755787
Reports root / small


dynamic_domains_23 / pgsql_mnesia / 6755787
Reports root/ big
OK: 1812 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 6755787
Reports root/ big
OK: 1534 / Failed: 1 / User-skipped: 363 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_54.885791@localhost/res1">>},
        {<<"id">>,<<"b4f46449-c1b6-48fd-88ee-f14d0d4d98a2">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"e22b9eb8-4aab-4479-9f19-76e511ca7f3d">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_54.885791@localhost/res1' id='b4f46449-c1b6-48fd-88ee-f14d0d4d98a2' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='e22b9eb8-4aab-4479-9f19-76e511ca7f3d'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-res...

Report log


ldap_mnesia_22 / ldap_mnesia / 6755787
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 6755787
Reports root/ big
OK: 1516 / Failed: 0 / User-skipped: 363 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 6755787
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 6755787
Reports root/ big
OK: 1892 / Failed: 0 / User-skipped: 286 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / 6755787
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 6755787
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 6755787
Reports root/ big
OK: 3091 / Failed: 0 / User-skipped: 184 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 6755787
Reports root/ big
OK: 3074 / Failed: 0 / User-skipped: 201 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 6755787
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 289 / Auto-skipped: 0

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

Good!

@chrzaszcz chrzaszcz merged commit cf75dd9 into master Sep 10, 2021
@chrzaszcz chrzaszcz deleted the support-dynamic-domains-in-mod_sic branch September 10, 2021 10:56
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
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