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

Mod offline graphql #3688

Merged
merged 3 commits into from
Jun 22, 2022
Merged

Mod offline graphql #3688

merged 3 commits into from
Jun 22, 2022

Conversation

JanuszJakubiec
Copy link
Contributor

Adding mod_offline admin resolver and tests

@JanuszJakubiec JanuszJakubiec marked this pull request as ready for review June 21, 2022 12:11
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #3688 (dd97292) into feature/graphql (a7b3abd) will increase coverage by 0.03%.
The diff coverage is 84.61%.

@@                 Coverage Diff                 @@
##           feature/graphql    #3688      +/-   ##
===================================================
+ Coverage            82.04%   82.08%   +0.03%     
===================================================
  Files                  502      504       +2     
  Lines                33640    33656      +16     
===================================================
+ Hits                 27600    27626      +26     
+ Misses                6040     6030      -10     
Impacted Files Coverage Δ
src/graphql/mongoose_graphql.erl 91.30% <ø> (ø)
src/ejabberd_admin.erl 58.58% <66.66%> (+0.17%) ⬆️
src/offline/mod_offline_api.erl 84.61% <84.61%> (ø)
.../graphql/admin/mongoose_graphql_admin_mutation.erl 100.00% <100.00%> (ø)
.../admin/mongoose_graphql_offline_admin_mutation.erl 100.00% <100.00%> (ø)
src/elasticsearch/mongoose_elasticsearch.erl 76.92% <0.00%> (-7.70%) ⬇️
src/cassandra/mongoose_cassandra.erl 77.77% <0.00%> (-3.71%) ⬇️
src/cassandra/mongoose_cassandra_worker.erl 65.72% <0.00%> (-2.82%) ⬇️
src/pubsub/node_pep.erl 79.62% <0.00%> (-1.86%) ⬇️
src/mam/mod_mam_elasticsearch_arch.erl 85.08% <0.00%> (-1.76%) ⬇️
... and 13 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 a7b3abd...dd97292. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 21, 2022

small_tests_24 / small_tests / 209ea82
Reports root / small


small_tests_23 / small_tests / 209ea82
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 209ea82
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 209ea82
Reports root/ big
OK: 3132 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 209ea82
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 209ea82
Reports root/ big
OK: 1736 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 209ea82
Reports root/ big
OK: 1736 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 209ea82
Reports root/ big
OK: 3166 / Failed: 2 / User-skipped: 133 / Auto-skipped: 0

muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive
{error,{{assertion_failed,assert,is_groupchat_message,
              [<<"Restorable message">>],
              undefined,"undefined"},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {muc_SUITE,wait_for_mam_result,3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4383}]},
     {muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4124}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4120}]},
     {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

muc_SUITE:register:user_submits_registration_form_twice
{error,
  {{assertion_failed,assert,is_iq_result,
     [{xmlel,<<"iq">>,
        [{<<"type">>,<<"set">>},
         {<<"id">>,<<"8badbc65a24c5183635e265d89f65650">>},
         {<<"to">>,<<"groupchats.domain.example.com">>}],
        [{xmlel,<<"query">>,
           [{<<"xmlns">>,<<"jabber:iq:register">>}],
           [{xmlel,<<"x">>,
            [{<<"xmlns">>,<<"jabber:x:data">>},
             {<<"type">>,<<"submit">>}],
            [{xmlel,<<"field">>,
               [{<<"type">>,<<"hidden">>},
                {<<"var">>,<<"FORM_TYPE">>}],
               [{xmlel,<<"value">>,[],
                  [{xmlcdata,<<"jabber:iq:register">>}]}]},
             {xmlel,<<"field">>,
               [{<<"type">>,<<"text-single">>},
                {<<"var">>,<<"nick">>}],
               [{xmlel,<<"value">>,[],
                  [{xmlcdata,
                     <<"thirdwitchroom-d6f688edba">>}]}]}]}]}]}],
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"groupchats.domain.example.com">>},
        {<<"to">>,
         <<"alice_user_submits_registration_form_twice_1963@domain.example.com/res1">>},
        {<<"type">>,<<"error">>},
        {<<"xml:lang">>,<<"en">>},
        {<<"id">>,<<"8badbc65a24c5183635e265d89f65650">>}],
       [{xmlel,<<"query">>,
          [{<<"xmlns">>,<<"jabber:iq:register">>}],
          [{xmlel,<<"x">>,
             [{<<"xmlns">>,<<"jabber:x:data">>},
            {<<"type">>,<<"submit">>}],
             [{xmlel,<<"field">>,
              [{<<"type">>,<<"hidden">>},
          ...

Report log


internal_mnesia_24 / internal_mnesia / 209ea82
Reports root/ big
OK: 1798 / Failed: 0 / User-skipped: 398 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 209ea82
Reports root/ big
OK: 3540 / Failed: 2 / User-skipped: 147 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2027@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2027@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"2EP3JPdYc0QNSYHp31vOSQ==">>}],
            [{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

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2039@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2039@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"beHC1L2z6wvM11tMQGEBgA==">>}],
            [{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_24 / elasticsearch_and_cassandra_mnesia / 209ea82
Reports root/ big
OK: 2112 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 209ea82
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 209ea82
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 209ea82
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 209ea82
Reports root/ big
OK: 1959 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 21, 2022

small_tests_24 / small_tests / 50c2054
Reports root / small


small_tests_23 / small_tests / 50c2054
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 50c2054
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 50c2054
Reports root/ big
OK: 3132 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 50c2054
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 50c2054
Reports root/ big
OK: 1736 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 50c2054
Reports root/ big
OK: 1742 / Failed: 1 / User-skipped: 460 / Auto-skipped: 0

offline_SUITE:mod_offline_tests:offline_message_is_stored_and_delivered_at_login
{error,
  {{assertion_failed,assert_many,true,
     [is_presence,#Fun<offline_SUITE.10.119913959>],
     [{xmlel,<<"presence">>,
        [{<<"from">>,
        <<"bob_offline_message_is_stored_and_delivered_at_login_976@localhost/new-session">>},
         {<<"to">>,
        <<"bob_offline_message_is_stored_and_delivered_at_login_976@localhost/new-session">>},
         {<<"xml:lang">>,<<"en">>}],
        []},
      {xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_offline_message_is_stored_and_delivered_at_login_976@localhost/res1">>},
         {<<"to">>,
        <<"bob_offline_message_is_stored_and_delivered_at_login_976@localhost/res1">>},
         {<<"xml:lang">>,<<"en">>},
         {<<"type">>,<<"chat">>}],
        [{xmlel,<<"body">>,[],[{xmlcdata,<<"msgtxt">>}]}]}],
     "   <presence from='bob_offline_message_is_stored_and_delivered_at_login_976@localhost/new-session' to='bob_offline_message_is_stored_and_delivered_at_login_976@localhost/new-session' xml:lang='en'/>   <message from='alice_offline_message_is_stored_and_delivered_at_login_976@localhost/res1' to='bob_offline_message_is_stored_and_delivered_at_login_976@localhost/res1' xml:lang='en' type='chat'><body>msgtxt</body></message>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib...

Report log


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 50c2054
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 50c2054
Reports root/ big
OK: 1798 / Failed: 0 / User-skipped: 398 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 50c2054
Reports root/ big
OK: 2112 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 50c2054
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 50c2054
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 50c2054
Reports root/ big
OK: 3518 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 50c2054
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 50c2054
Reports root/ big
OK: 1959 / Failed: 0 / User-skipped: 394 / 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.

It looks good, I have minor comments

big_tests/tests/graphql_offline_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_offline_SUITE.erl Outdated Show resolved Hide resolved
big_tests/tests/graphql_offline_SUITE.erl Outdated Show resolved Hide resolved
src/offline/mod_offline_api.erl Outdated Show resolved Hide resolved
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jun 22, 2022

small_tests_24 / small_tests / dd97292
Reports root / small


small_tests_23 / small_tests / dd97292
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / dd97292
Reports root/ big
OK: 3132 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / dd97292
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / dd97292
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / dd97292
Reports root/ big
OK: 1736 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / dd97292
Reports root/ big
OK: 3149 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / dd97292
Reports root/ big
OK: 1736 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / dd97292
Reports root/ big
OK: 1798 / Failed: 0 / User-skipped: 398 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / dd97292
Reports root/ big
OK: 2112 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / dd97292
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / dd97292
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / dd97292
Reports root/ big
OK: 3518 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / dd97292
Reports root/ big
OK: 1959 / Failed: 0 / User-skipped: 394 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / dd97292
Reports root/ big
OK: 3523 / Failed: 0 / User-skipped: 142 / 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 👍

@JanuszJakubiec JanuszJakubiec merged commit 8f8f488 into feature/graphql Jun 22, 2022
@JanuszJakubiec JanuszJakubiec deleted the graphql/offline branch June 22, 2022 08:40
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants