-
Notifications
You must be signed in to change notification settings - Fork 428
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_keystore #3849
Conversation
small_tests_24 / small_tests / 1ee3502 small_tests_25 / small_tests / 1ee3502 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 1ee3502 ldap_mnesia_24 / ldap_mnesia / 1ee3502 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 1ee3502 ldap_mnesia_25 / ldap_mnesia / 1ee3502 dynamic_domains_mysql_redis_25 / mysql_redis / 1ee3502 pgsql_mnesia_24 / pgsql_mnesia / 1ee3502 pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2546@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2546@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"xuBj2Gci9r3zF6ppBnBrxQ==">>}],
[{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}]}]}} internal_mnesia_25 / internal_mnesia / 1ee3502 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 1ee3502 riak_mnesia_24 / riak_mnesia / 1ee3502 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 1ee3502 pgsql_mnesia_25 / pgsql_mnesia / 1ee3502 mysql_redis_25 / mysql_redis / 1ee3502 mssql_mnesia_25 / odbc_mssql_mnesia / 1ee3502 |
Codecov ReportBase: 83.11% // Head: 83.09% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3849 +/- ##
==========================================
- Coverage 83.11% 83.09% -0.02%
==========================================
Files 534 534
Lines 34096 34100 +4
==========================================
- Hits 28339 28337 -2
- Misses 5757 5763 +6
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. |
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.
Just one small note.
src/mod_keystore.erl
Outdated
get_key(HandlerAcc, KeyID) -> | ||
try | ||
Params :: #{key_id := key_id()}, | ||
Extra :: map(). |
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.
Same thing than usual, for good habit please use here the newly declared gen_hook:extra()
type.
1ee3502
to
ed7f122
Compare
ed7f122
to
f43f1e5
Compare
small_tests_24 / small_tests / ed7f122 small_tests_25 / small_tests / ed7f122 ldap_mnesia_24 / ldap_mnesia / ed7f122 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / ed7f122 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / ed7f122 ldap_mnesia_25 / ldap_mnesia / ed7f122 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / ed7f122 dynamic_domains_mysql_redis_25 / mysql_redis / ed7f122 internal_mnesia_25 / internal_mnesia / ed7f122 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / ed7f122 service_mongoose_system_metrics_SUITE:system_metrics_are_reported_to_configurable_google_analytics{error,
{{assertEqual,
[{module,service_mongoose_system_metrics_SUITE},
{line,470},
{expression,"ActualTrackingIds"},
{expected,[<<"UA-151671255-1">>,<<"UA-EXTRA-TRACKING-ID">>]},
{value,[<<"UA-151671255-1">>]}]},
[{service_mongoose_system_metrics_SUITE,
events_are_reported_to_tracking_ids,1,
[{file,
"/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
{line,470}]},
{service_mongoose_system_metrics_SUITE,
system_metrics_are_reported_to_configurable_google_analytics,1,
[{file,
"/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
{line,204}]},
{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}]}]}} pgsql_mnesia_24 / pgsql_mnesia / ed7f122 riak_mnesia_24 / riak_mnesia / ed7f122 pgsql_mnesia_25 / pgsql_mnesia / ed7f122 mysql_redis_25 / mysql_redis / ed7f122 mssql_mnesia_25 / odbc_mssql_mnesia / ed7f122 pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2672@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2672@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"a/E/x5KKnlkazVi6Dm1xLQ==">>}],
[{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,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}]}]}} |
small_tests_24 / small_tests / f43f1e5 small_tests_25 / small_tests / f43f1e5 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / f43f1e5 graphql_server_SUITE:admin_http:clustering_http_tests:remove_dead_from_cluster_http{error,
{{badrpc,
{'EXIT',
{{badmatch,
{error,
{shutdown,
{gen_server,call,
[<9159.11411.1>,
{sync_dump_log,schema_prepare},
infinity]}}}},
[{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,118}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim3@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_dead_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,247}]},
{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}]}]}} graphql_server_SUITE:admin_http:clustering_http_tests:remove_alive_from_cluster_http{error,
{{badrpc,
{'EXIT',
{#{cluster_member => mongooseim@localhost,
reason => set_extra_db_nodes_failed,
result =>
{error,
{merge_schema_failed,
"Incompatible schema cookies. Please, restart from old backup.mongooseim3@localhost = [{name,schema},{type,set},{ram_copies,[]},{disc_copies,[mongooseim3@localhost]},{disc_only_copies,[]},{load_order,0},{access_mode,read_write},{majority,false},{index,[]},{snmp,[]},{local_content,false},{record_name,schema},{attributes,[table,cstruct]},{user_properties,[]},{frag_properties,[]},{storage_properties,[]},{cookie,{{1668072300310507616,-576460752303403005,1},mongooseim3@localhost}},{version,{{3,0},{mongooseim3@localhost,{1668,72300,933289}}}}], mongooseim2@localhost = [{name,schema},{type,set},{ram_copies,[mongooseim3@localhost,mongooseim2@localhost]},{disc_copies,[mongooseim@localhost]},{disc_only_copies,[]},{load_order,0},{access_mode,read_write},{majority,false},{index,[]},{snmp,[]},{local_content,false},{record_name,schema},{attributes,[table,cstruct]},{user_properties,[]},{frag_properties,[]},{storage_properties,[]},{cookie,{{1668072293440566146,-576460752303186047,1},mongooseim@localhost}},{version,{{6,0},{mongooseim2@localhost,{1668,72301,318737}}}}]\n"}}},
[{mongoose_cluster,set_extra_db_nodes,1,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,132}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/ci... graphql_server_SUITE:admin_cli:clustering_tests:join_successful{error,{{verify_result,[],
[{times,20,
[{#{node => mongooseim2@localhost},
[mongooseim@localhost],
true},
{#{node => mongooseim@localhost},
[mongooseim2@localhost],
true}]}]},
[{mongoose_helper,do_wait_until,2,
[{file,"/home/circleci/project/big_tests/tests/mongoose_helper.erl"},
{line,371}]},
{distributed_helper,verify_result,2,
[{file,"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,53}]},
{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}]}]}} graphql_server_SUITE:admin_cli:clustering_tests:leave_successful{error,{#{expected_type => ok,
response_code => {exit_status,1},
what => invalid_response_code},
[{graphql_helper,assert_response_code,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,256}]},
{graphql_helper,get_ok_value,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,239}]},
{graphql_server_SUITE,leave_successful,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,150}]},
{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}]}]}} graphql_server_SUITE:admin_cli:clustering_tests:join_unsuccessful{error,
{{verify_result,[],
[{times,20,
{'EXIT',
{{badrpc,nodedown},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
mnesia,system_info,
[running_db_nodes]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{distributed_helper,do_verify_result,2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,68}]},
{distributed_helper,'-verify_result/2-fun-0-',2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,53}]},
{mongoose_helper,do_wait_until,2,
[{file,
"/home/circleci/project/big_tests/tests/mongoose_helper.erl"},
{line,374}]},
{distributed_helper,verify_result,2,
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,53}]},
{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}]}]}}}]},
[{mongoose_helper,do_wait_until,2,
[{file,"/home/circleci/project/big_tests/tests/mongoose_helper.erl"},
{line,371}]},... graphql_server_SUITE:admin_cli:clustering_tests:leave_but_no_cluster{error,
{function_clause,
[{graphql_helper,get_error,
[1,
{{exit_status,3},
"Failed RPC connection to the node mongooseim@localhost: nodedown\n\nCommands to start a MongooseIM node:\n start Start a MongooseIM node as daemon (detached from terminal)\n debug Attach an interactive Erlang shell to a running MongooseIM node\n live Start MongooseIM node in live (interactive) mode\n foreground Start MongooseIM node in foreground (non-interactive) mode\nMongooseIM cluster management commands:\n join_cluster other_node_name Add current node to cluster\n leave_cluster Make the current node leave the cluster\n remove_from_cluster other_node_name Remove dead node from the cluster\nExtra Commands:\n bootstrap Executes MongooseIM init scripts (used for initial configuration)\n print_install_dir Prints path to MongooseIM release directory\n escript Runs escript command using embedded Erlang Runtime System\n\n"}],
[{file,
"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,229}]},
{graphql_helper,get_err_code,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,206}]},
{graphql_server_SUITE,leave_but_no_cluster,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,160}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},... graphql_server_SUITE:admin_cli:clustering_tests:join_twice{error,{#{expected_type => ok,
response_code => {exit_status,3},
what => invalid_response_code},
[{graphql_helper,assert_response_code,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,256}]},
{graphql_helper,get_ok_value,2,
[{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
{line,239}]},
{graphql_server_SUITE,join_twice,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,165}]},
{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}]}]}} graphql_server_SUITE:admin_cli:clustering_tests:remove_dead_from_cluster{error,
{{badrpc,
{'EXIT',
{pang,
[{mongoose_cluster,check_networking,
[mongooseim@localhost],
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,111}]},
{mongoose_cluster,'-do_join/1-fun-0-',1,
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,35}]},
{mongoose_cluster,with_app_stopped,2,
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_dead_from_cluster,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,175}]},
{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}]}]}} graphql_server_SUITE:admin_cli:clustering_tests:remove_alive_from_cluster{error,
{{badrpc,
{'EXIT',
{pang,
[{mongoose_cluster,check_networking,
[mongooseim@localhost],
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,111}]},
{mongoose_cluster,'-do_join/1-fun-0-',1,
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,35}]},
{mongoose_cluster,with_app_stopped,2,
[{file,
"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim2@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_alive_from_cluster,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,198}]},
{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}]}]}} graphql_server_SUITE:end_per_suite{error,{{badrpc,nodedown},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
gen_mod,loaded_modules_with_opts,
[<<"localhost">>]],
[{file,"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{dynamic_modules,restore_modules,3,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,50}]},
{dynamic_modules,'-restore_modules/2-lc$^0/1-0-',2,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,45}]},
{dynamic_modules,restore_modules,2,
[{file,"/home/circleci/project/big_tests/tests/dynamic_modules.erl"},
{line,46}]},
{graphql_server_SUITE,end_per_suite,1,
[{file,"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,76}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1379}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / f43f1e5 ldap_mnesia_24 / ldap_mnesia / f43f1e5 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / f43f1e5 ldap_mnesia_25 / ldap_mnesia / f43f1e5 dynamic_domains_mysql_redis_25 / mysql_redis / f43f1e5 internal_mnesia_25 / internal_mnesia / f43f1e5 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / f43f1e5 pgsql_mnesia_24 / pgsql_mnesia / f43f1e5 mysql_redis_25 / mysql_redis / f43f1e5 riak_mnesia_24 / riak_mnesia / f43f1e5 pgsql_mnesia_25 / pgsql_mnesia / f43f1e5 mssql_mnesia_25 / odbc_mssql_mnesia / f43f1e5 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / f43f1e5 |
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.
LGTM
This PR changes all hook handlers in
mod_keystore
module togen_hook
format.