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

Implement mod_pubsub_db without dynamic modules MIM-1801 #3953

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

arcusfelis
Copy link
Contributor

This PR addresses MIM-1801

Proposed changes include:

  • Remove backend_module
  • Implement mod_pubsub_db without dynamic modules
  • Enable dialyzer's {warnings, [unknown]} check

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 27, 2023

small_tests_24 / small_tests / c452d67
Reports root / small


small_tests_25 / small_tests / c452d67
Reports root / small


ldap_mnesia_24 / ldap_mnesia / c452d67
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / c452d67
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / c452d67
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / c452d67
Reports root/ big
OK: 4153 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / c452d67
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / c452d67
Reports root/ big
OK: 4176 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / c452d67
Reports root/ big
OK: 2367 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / c452d67
Reports root/ big
OK: 4566 / 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_2725@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2725@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"8t/aE+jvoSj0gLWgzBEoDw==">>}],
            [{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


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / c452d67
Reports root/ big
OK: 2727 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / c452d67
Reports root/ big
OK: 2565 / Failed: 0 / User-skipped: 654 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / c452d67
Reports root/ big
OK: 4541 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / c452d67
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / c452d67
Reports root/ big
OK: 4552 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Base: 83.17% // Head: 83.20% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (ef5735f) compared to base (919d5c3).
Patch coverage: 97.91% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3953      +/-   ##
==========================================
+ Coverage   83.17%   83.20%   +0.02%     
==========================================
  Files         534      534              
  Lines       34118    34168      +50     
==========================================
+ Hits        28377    28428      +51     
+ Misses       5741     5740       -1     
Impacted Files Coverage Δ
src/async_pools/mongoose_aggregator_worker.erl 68.33% <ø> (+5.00%) ⬆️
src/auth/mongoose_gen_auth.erl 85.36% <ø> (ø)
src/dynamic_compile.erl 34.21% <ø> (ø)
src/inbox/mod_inbox_rdbms_async.erl 72.05% <ø> (ø)
src/mam/mod_mam_pm.erl 89.60% <ø> (ø)
src/mod_muc_rdbms.erl 95.20% <ø> (ø)
src/mongoose_backend.erl 100.00% <ø> (ø)
src/pubsub/mod_pubsub_db.erl 57.14% <ø> (ø)
src/pubsub/mod_pubsub_db_mnesia.erl 92.82% <ø> (+0.42%) ⬆️
src/rdbms/mongoose_rdbms.erl 67.01% <ø> (+1.75%) ⬆️
... and 24 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.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 27, 2023

small_tests_24 / small_tests / 931d39d
Reports root / small


small_tests_25 / small_tests / 931d39d
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 931d39d
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 931d39d
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 931d39d
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 931d39d
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 931d39d
Reports root/ big
OK: 4153 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 931d39d
Reports root/ big
OK: 2367 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 931d39d
Reports root/ big
OK: 4176 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 931d39d
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 931d39d
Reports root/ big
OK: 2727 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 931d39d
Reports root/ big
OK: 2565 / Failed: 0 / User-skipped: 654 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 931d39d
Reports root/ big
OK: 4541 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 931d39d
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 931d39d
Reports root/ big
OK: 4552 / Failed: 0 / User-skipped: 100 / 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.

Looks good, I added minor remarks.

rebar.config Outdated
@@ -209,7 +209,7 @@

{dialyzer, [
%% Disabled till mod_pubsub is converted to dynamic domains style
Copy link
Member

Choose a reason for hiding this comment

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

Comment not relevant anymore

init(HostType, Opts) ->
TrackedFuns = [create_node, del_node, get_state, get_states,
get_states_by_lus, get_states_by_bare,
get_states_by_full, get_own_nodes_states,
Copy link
Member

Choose a reason for hiding this comment

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

These two functions don't exist, could you double-check them all?

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 30, 2023

small_tests_24 / small_tests / 49ade5b
Reports root / small


small_tests_25 / small_tests / 49ade5b
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 49ade5b
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 49ade5b
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 49ade5b
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 49ade5b
Reports root/ big
OK: 4153 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 49ade5b
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 49ade5b
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 49ade5b
Reports root/ big
OK: 2367 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 49ade5b
Reports root/ big
OK: 4176 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 49ade5b
Reports root/ big
OK: 2727 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 49ade5b
Reports root/ big
OK: 2565 / Failed: 0 / User-skipped: 654 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 49ade5b
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 49ade5b
Reports root/ big
OK: 4541 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 49ade5b
Reports root/ big
OK: 4552 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 31, 2023

small_tests_24 / small_tests / ef5735f
Reports root / small


small_tests_25 / small_tests / ef5735f
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / ef5735f
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / ef5735f
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / ef5735f
Reports root/ big
OK: 2225 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / ef5735f
Reports root/ big
OK: 4179 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / ef5735f
Reports root/ big
OK: 4153 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / ef5735f
Reports root/ big
OK: 2367 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / ef5735f
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / ef5735f
Reports root/ big
OK: 4176 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / ef5735f
Reports root/ big
OK: 2727 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / ef5735f
Reports root/ big
OK: 2565 / Failed: 0 / User-skipped: 654 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / ef5735f
Reports root/ big
OK: 4555 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / ef5735f
Reports root/ big
OK: 4552 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / ef5735f
Reports root/ big
OK: 4541 / Failed: 0 / User-skipped: 111 / 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.

Looks good 🚀

@chrzaszcz chrzaszcz merged commit a6bc5cb into master Jan 31, 2023
@chrzaszcz chrzaszcz deleted the mu-pubsub-without-dyn-mods branch January 31, 2023 16:17
@jacekwegr jacekwegr added this to the 6.1.0 milestone Apr 26, 2023
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.

None yet

4 participants