-
Notifications
You must be signed in to change notification settings - Fork 429
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
Refactor/roster #4209
Refactor/roster #4209
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
79547ea
to
0a3f2e8
Compare
0ce71ac
to
b30cf42
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4209 +/- ##
==========================================
+ Coverage 84.33% 84.34% +0.01%
==========================================
Files 552 552
Lines 33436 33413 -23
==========================================
- Hits 28198 28182 -16
+ Misses 5238 5231 -7 ☔ View full report in Codecov by Sentry. |
b30cf42
to
021e84f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
021e84f
to
41fe974
Compare
This comment was marked as outdated.
This comment was marked as outdated.
41fe974
to
c4c3acb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
c4c3acb
to
045af80
Compare
This comment was marked as outdated.
This comment was marked as outdated.
045af80
to
d333835
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Use the roster list as the accumulator of the hook, for more intentionality.
d333835
to
85ed4f0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the refactor ❤️ I left some comments with my thoughts to consider.
This comment was marked as outdated.
This comment was marked as outdated.
025ed1d
to
6ace2c0
Compare
elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 6ace2c0 small_tests_25 / small_tests / 6ace2c0 small_tests_26 / small_tests / 6ace2c0 small_tests_26_arm64 / small_tests / 6ace2c0 ldap_mnesia_25 / ldap_mnesia / 6ace2c0 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 6ace2c0 dynamic_domains_mysql_redis_26 / mysql_redis / 6ace2c0 ldap_mnesia_26 / ldap_mnesia / 6ace2c0 dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 6ace2c0 internal_mnesia_26 / internal_mnesia / 6ace2c0 dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 6ace2c0 graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id{error,
{{badmatch,null},
[{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
{line,1155}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:end_per_group{error,
{{unregistering_failed,
{amount,3},
{unregistered_items,
[{{<<"_domain_admin_create_room_no_permission_1104">>,
[{escalus_event_mgr,<0.24704.0>},
{tc_name,domain_admin_create_room_no_permission},
{escalus_cleaner,<0.24703.0>},
{watchdog,<0.24702.0>},
{muc_light_host,<<"muclight.domain.example.com">>},
{secondary_muc_light_host,<<"muclight.domain.example.org">>},
{protocol,http},
{domain_admin,{<<"admin@domain.example.com">>,<<"a3ff986d55adb21d">>}},
{schema_endpoint,domain_admin},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{preset,"odbc_mssql_mnesia"},
{mim_data_dir,
"/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE_data"},
{tc_logfile,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4209/208236/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40606610c9432f.2024-02-20_20.11.10/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-02-20_20.15.24/graphql_muc_light_suite.domain_admin_create_room_no_permission.html"},
{tc_group_properties,[{name,domain_admin_muc_light}]},
{tc_group_path,[[{name,domain_admin}]]},
{data_dir,
"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_light_SUITE_data/"},
{priv_dir,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4209/208236/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40606610c9432f.2024-02-20_20.11.10/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-02-20_20.15.24/log_private/"},
{{saved_modules,mongooseim@localhost,<<"test type"... pgsql_cets_26 / pgsql_cets / 6ace2c0 pgsql_mnesia_25 / pgsql_mnesia / 6ace2c0 mysql_redis_26 / mysql_redis / 6ace2c0 pgsql_mnesia_26 / pgsql_mnesia / 6ace2c0 mssql_mnesia_26 / odbc_mssql_mnesia / 6ace2c0 graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id{error,
{{badmatch,null},
[{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
{line,1155}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 6ace2c0 mssql_mnesia_26 / odbc_mssql_mnesia / 6ace2c0 graphql_muc_light_SUITE:admin_cli:admin_muc_light:end_per_group{error,
{{unregistering_failed,
{amount,2},
{unregistered_items,
[{{<<"_admin_invite_user_1074">>,
[{escalus_event_mgr,<0.24515.0>},
{tc_name,admin_invite_user},
{escalus_cleaner,<0.24514.0>},
{watchdog,<0.24513.0>},
{muc_light_host,<<"muclight.localhost">>},
{secondary_muc_light_host,<<"muclight.localhost.bis">>},
{protocol,cli},
{schema_endpoint,admin},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{preset,"odbc_mssql_mnesia"},
{mim_data_dir,
"/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE_data"},
{tc_logfile,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4209/208251/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40b9f6146bb6ec.2024-02-20_20.36.48/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-02-20_20.41.03/graphql_muc_light_suite.admin_invite_user.55682.html"},
{tc_group_properties,[{name,admin_muc_light}]},
{tc_group_path,[[{name,admin_cli}]]},
{data_dir,
"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_light_SUITE_data/"},
{priv_dir,
"https://circleci-mim-results.s3.eu-central-1.amazonaws.com/PR/4209/208251/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40b9f6146bb6ec.2024-02-20_20.36.48/big_tests.tests.graphql_muc_light_SUITE.logs/run.2024-02-20_20.41.03/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,iqdisc => parallel,backend => rdbms},
mod_roster ... graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:admin_create_room_with_unprepped_id{error,
{{badmatch,null},
[{graphql_muc_light_SUITE,admin_create_room_with_unprepped_id,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_muc_light_SUITE.erl"},
{line,1155}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1302}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1234}]}]}} mssql_mnesia_26 / odbc_mssql_mnesia / 6ace2c0 |
This modernises a bit code in mod_roster, by using exml_query, preferring tagged jids for type information, and most importantly, refactoring RDBMS operations to be transactional and use primary keys, see for example how
priv/pg.sql#L56
has no use of primary keys and lots of redundant indexes.