-
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
Add mongoose_rdbms_backend #3390
Add mongoose_rdbms_backend #3390
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## without-dynamic-backend-modules #3390 +/- ##
================================================================
Coverage 80.89% 80.90%
================================================================
Files 414 415 +1
Lines 32640 32654 +14
================================================================
+ Hits 26405 26419 +14
Misses 6235 6235
Continue to review 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.
That is basically great!
Only remember to remove the xref ignore from here as well:
Line 22 in d21eb5d
mongoose_rdbms_backend, |
I'm very happy to see this one, it gets us a step closer to supporting more than one rdbms pool, looking forward for that :)
8a33796
to
0e4833e
Compare
0e4833e
to
6ce5112
Compare
small_tests_24 / small_tests / 6ce5112 internal_mnesia_24 / internal_mnesia / 6ce5112 small_tests_23 / small_tests / 6ce5112 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6ce5112 ldap_mnesia_24 / ldap_mnesia / 6ce5112 mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted{error,
{{assertMatch,
[{module,mod_event_pusher_rabbit_SUITE},
{line,435},
{expression,
"get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
{pattern,
"# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
{value,
#{<<"from_user_id">> =>
<<"muc_publish@muc.localhost/bOb_unnamed_23.639741">>,
<<"message">> => <<"Hi there!">>,
<<"to_user_id">> =>
<<"alice_unnamed_23.750173@localhost/res1">>}}]},
[{mod_event_pusher_rabbit_SUITE,
'-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
[{file,
"/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
{line,435}]},
{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}]}]}} dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 6ce5112 ldap_mnesia_23 / ldap_mnesia / 6ce5112 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 6ce5112 inbox_SUITE:one_to_one:other_resources_do_not_interfere{error,
{test_case_failed,
#{check_params => #{},
error => {badmatch,1},
expected_items =>
[#{content => <<"How are you">>,
from =>
<<"kate_other_resources_do_not_interfere_72.876724@domain.example.com/res1">>,
to =>
<<"mike_other_resources_do_not_interfere_72.876724@domain.example.com/res1">>,
unread => 2,verify => #Fun<inbox_SUITE.117.11357666>}],
inbox_items =>
[<<"<message from='mike_other_resources_do_not_interfere_72.876724@domain.example.com' to='mike_other_resources_do_not_interfere_72.876724@domain.example.com/res1' id='1fb4ae2e-bdc9-4a8c-9204-0b7100e5df56'><result xmlns='erlang-solutions.com:xmpp:inbox:0' unread='1' queryid='b94c98af1b128b5d695bf3df805cc559'><forwarded xmlns='urn:xmpp:forward:0'><delay xmlns='urn:xmpp:delay' stamp='2021-11-09T09:07:58.328503Z'/><message from='kate_other_resources_do_not_interfere_72.876724@domain.example.com/res1' xml:lang='en' to='mike_other_resources_do_not_interfere_72.876724@domain.example.com/res1' type='chat' id='82efbb7f1fc2d21624f8e19bb401ddca'><body>How are you</body></message></forwarded><archive>false</archive><mute>0</mute></result></message>">>],
query_params => #{},reason => inbox_mismatch,
stacktrace =>
[{inbox_helper,process_inbox_message,4,
[{file,
"/home/circleci/app/big_tests/tests/inbox_helper.erl"},
{line,194}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1342}]},... elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 6ce5112 pgsql_mnesia_24 / pgsql_mnesia / 6ce5112 mysql_redis_24 / mysql_redis / 6ce5112 mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted{error,
{{assertMatch,
[{module,mod_event_pusher_rabbit_SUITE},
{line,435},
{expression,
"get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
{pattern,
"# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
{value,
#{<<"from_user_id">> =>
<<"muc_publish@muc.localhost/bOb_unnamed_72.423185">>,
<<"message">> => <<"Hi there!">>,
<<"to_user_id">> =>
<<"alice_unnamed_72.580939@localhost/res1">>}}]},
[{mod_event_pusher_rabbit_SUITE,
'-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
[{file,
"/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
{line,435}]},
{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}]}]}} mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted{error,
{{assertMatch,
[{module,mod_event_pusher_rabbit_SUITE},
{line,435},
{expression,
"get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
{pattern,
"# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
{value,
#{<<"from_user_id">> =>
<<"muc_publish@muc.localhost/bOb_unnamed_72.423185">>,
<<"message">> => <<"Hi there!">>,
<<"to_user_id">> =>
<<"alice_unnamed_73.281596@localhost/res1">>}}]},
[{mod_event_pusher_rabbit_SUITE,
'-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
[{file,
"/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
{line,435}]},
{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}]}]}} pgsql_mnesia_23 / pgsql_mnesia / 6ce5112 mssql_mnesia_24 / odbc_mssql_mnesia / 6ce5112 riak_mnesia_24 / riak_mnesia / 6ce5112 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_90.502706@localhost/res1">>},
{<<"id">>,<<"65c73f4c-7704-4f41-b1f8-42bf70222e5e">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"jingle">>,
[{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
{<<"action">>,<<"session-terminate">>},
{<<"sid">>,<<"b77dfad1-c619-4497-bbe6-70153d57e7d4">>}],
[{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_90.502706@localhost/res1' id='65c73f4c-7704-4f41-b1f8-42bf70222e5e' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='b77dfad1-c619-4497-bbe6-70153d57e7d4'><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,395}]},
{jingle_SUITE,
'-res... 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_1.174176@localhost/res1">>},
{<<"id">>,<<"398a5718-31fd-43b0-832e-e7a0a8bd6eb9">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"jingle">>,
[{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
{<<"action">>,<<"session-terminate">>},
{<<"sid">>,<<"b61e67c6-ff55-40bc-bf08-1e435b4dbd55">>}],
[{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_1.174176@localhost/res1' id='398a5718-31fd-43b0-832e-e7a0a8bd6eb9' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='b61e67c6-ff55-40bc-bf08-1e435b4dbd55'><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,395}]},
{jingle_SUITE,
'-resp_... dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 6ce5112 mysql_redis_24 / mysql_redis / 6ce5112 mam_SUITE:rdbms_simple_prefs_cases:messages_filtered_when_prefs_default_policy_is_roster{error,{test_case_failed,"ASSERT EQUAL\n\tExpected []\n\tValue [ok]\n"}} riak_mnesia_24 / riak_mnesia / 6ce5112 |
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.
Beautiful 👌🏽
With the changes done in #3386, this turned out to be really easy. Before that, I tried to make
mongoose_rdbms_backend
expose its API withHostType
s, but it was a bit messy. I think it's better to do it in a separate PR (after the wholewithout-dynamic-backend-modules
branch is merged), to keep this already big diff smaller and more focused.Other issue is that
mongoose_rdbms
has many functions exported, which seem to be not used, mainly for escaping different types. This could be revisited, but, in similar fashion, I left this as is for now.What's left to do is remove dynamic
mongoose_rdbms_type
, but it will be done in a separate PR.