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

GraphQL Admin CLI PoC #3701

Merged
merged 2 commits into from
Jul 7, 2022
Merged

GraphQL Admin CLI PoC #3701

merged 2 commits into from
Jul 7, 2022

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Jul 6, 2022

A Proof of Concept of an Admin API that wraps the GraphQL API and can fully replace the current CLI implementation (admin_extra + ejabberd_commands).

Key points:

  • Command specification is created on startup and stored in a persistent term. The specs are obtained from GraphQL with the use of introspection. The graphql_* modules are not used directly, because code code would get tightly coupled with the implementation of GraphQL, and it wouldn't be possible to switch to another GraphQL library.
  • Commands are accepting arguments as JSON and they are returning JSON on success, just like the GraphQL endpoint. This ensures consistency.
  • Query and mutation documents are auto-generated in a simple way (iolist concatenation) - it seems that this is enough for now.

Not included in this PoC:

  • Tests. We could use the auto-generated documents in big tests (graphql_*_SUITE), and/or have some commands tested end-to-end (with mongooseimctl).
  • Pretty error handling for cases like 'invalid JSON'
  • Removal of admin_extra and ejabberd_commands.
  • Docs.
  • Support for unions - used only in the getMetrics command. It is possible, but since the syntax is complex, the code would get more complicated as well.

Examples:

$ _build/mim1/rel/mongooseim/bin/mongooseimctl account listUsers '{"domain": "localhost"}'
{
  "data" : {
    "account" : {
      "listUsers" : "alice@localhost"
    }
  }
}

$ _build/mim1/rel/mongooseim/bin/mongooseimctl account listUsers '{"domane": "localhost"}'
{
  "errors" : [
    {
      "path" : [
        "..",
        "domain"
      ],
      "message" : "The parameter is non-null, but was undefined in parameter list",
      "extensions" : {
        "code" : "missing_non_null_param"
      }
    }
  ]
}

@chrzaszcz chrzaszcz changed the title Graphql CLI PoC GraphQL CLI PoC Jul 6, 2022
@chrzaszcz chrzaszcz changed the title GraphQL CLI PoC GraphQL Admin CLI PoC Jul 6, 2022
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 6, 2022

small_tests_24 / small_tests / 71e192a
Reports root / small


small_tests_25 / small_tests / 71e192a
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 71e192a
Reports root/ big
OK: 3121 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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


ldap_mnesia_24 / ldap_mnesia / 71e192a
Reports root/ big
OK: 1738 / Failed: 1 / User-skipped: 460 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 71e192a
Reports root/ big
OK: 3120 / Failed: 2 / User-skipped: 88 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log

service_mongoose_system_metrics_SUITE:module_opts:module_opts_are_reported
{error,
  {{assertEqual,
     [{module,service_mongoose_system_metrics_SUITE},
      {line,372},
      {expression,"is_module_opt_reported ( Module , Key , Value )"},
      {expected,true},
      {value,false}]},
   [{service_mongoose_system_metrics_SUITE,check_module_opt,3,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,372}]},
    {service_mongoose_system_metrics_SUITE,module_opts_are_reported,1,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,224}]},
    {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}]}]}}

Report log


dynamic_domains_mysql_redis_25 / mysql_redis / 71e192a
Reports root/ big
OK: 3104 / Failed: 1 / User-skipped: 105 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


ldap_mnesia_25 / ldap_mnesia / 71e192a
Reports root/ big
OK: 1738 / Failed: 1 / User-skipped: 460 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


pgsql_mnesia_24 / pgsql_mnesia / 71e192a
Reports root/ big
OK: 3495 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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


internal_mnesia_25 / internal_mnesia / 71e192a
Reports root/ big
OK: 1844 / Failed: 1 / User-skipped: 354 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 71e192a
Reports root/ big
OK: 2134 / Failed: 1 / User-skipped: 355 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


pgsql_mnesia_25 / pgsql_mnesia / 71e192a
Reports root/ big
OK: 3495 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


mysql_redis_25 / mysql_redis / 71e192a
Reports root/ big
OK: 3490 / Failed: 1 / User-skipped: 102 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 71e192a
Reports root/ big
OK: 1993 / Failed: 1 / User-skipped: 350 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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


mssql_mnesia_25 / odbc_mssql_mnesia / 71e192a
Reports root/ big
OK: 3495 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 71e192a
Reports root/ big
OK: 3121 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

mongooseimctl_SUITE:graphql:can_handle_execution_error
{error,{{assertMatch,[{module,mongooseimctl_SUITE},
            {line,1134},
            {expression,"Res"},
            {pattern,"{ _ , 0 }"},
            {value,{"{error,#{error_term =>\n       {parser_error,{1,graphql_parser,[\"syntax error before: \",\"'}'\"]}},\n     path => [],phase => parse}}\n",
                1}}]},
    [{mongooseimctl_SUITE,can_handle_execution_error,1,
                [{file,"/home/circleci/project/big_tests/tests/mongooseimctl_SUITE.erl"},
                 {line,1134}]},
     {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}]}]}}

Report log

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #3701 (2b49ec4) into master (bbdc781) will increase coverage by 0.07%.
The diff coverage is 92.40%.

@@            Coverage Diff             @@
##           master    #3701      +/-   ##
==========================================
+ Coverage   82.10%   82.18%   +0.07%     
==========================================
  Files         513      514       +1     
  Lines       33644    33716      +72     
==========================================
+ Hits        27624    27709      +85     
+ Misses       6020     6007      -13     
Impacted Files Coverage Δ
src/graphql/mongoose_graphql_scalar.erl 68.75% <ø> (ø)
src/ejabberd_ctl.erl 20.97% <82.35%> (+1.79%) ⬆️
src/graphql/mongoose_graphql_commands.erl 94.82% <94.82%> (ø)
src/ejabberd_app.erl 94.59% <100.00%> (+0.15%) ⬆️
src/graphql/mongoose_graphql_cowboy_handler.erl 94.18% <100.00%> (ø)
src/graphql/mongoose_graphql_response.erl 100.00% <100.00%> (ø)
src/inbox/mod_inbox_rdbms_async.erl 70.58% <0.00%> (-2.95%) ⬇️
src/mod_muc_room.erl 78.52% <0.00%> (-0.18%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/ejabberd_c2s.erl 89.23% <0.00%> (+0.29%) ⬆️
... and 8 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 bbdc781...2b49ec4. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 7, 2022

small_tests_24 / small_tests / 3af8e6a
Reports root / small


small_tests_25 / small_tests / 3af8e6a
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 3af8e6a
Reports root/ big
OK: 3122 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 3af8e6a
Reports root/ big
OK: 3105 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 3af8e6a
Reports root/ big
OK: 3122 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 3af8e6a
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 3af8e6a
Reports root/ big
OK: 3127 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

muc_SUITE:register:user_submits_registration_form
{error,
  {{assertion_failed,assert,is_iq_result,
     [{xmlel,<<"iq">>,
        [{<<"type">>,<<"set">>},
         {<<"id">>,<<"e269915f694d2244cc4be73043257fc5">>},
         {<<"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-2f90ba090a">>}]}]}]}]}]}],
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"groupchats.domain.example.com">>},
        {<<"to">>,
         <<"[email protected]/res1">>},
        {<<"type">>,<<"error">>},
        {<<"xml:lang">>,<<"en">>},
        {<<"id">>,<<"e269915f694d2244cc4be73043257fc5">>}],
       [{xmlel,<<"query">>,
          [{<<"xmlns">>,<<"jabber:iq:register">>}],
          [{xmlel,<<"x">>,
             [{<<"xmlns">>,<<"jabber:x:data">>},
            {<<"type">>,<<"submit">>}],
             [{xmlel,<<"field">>,
              [{<<"type">>,<<"hidden">>},
               {...

Report log


pgsql_mnesia_24 / pgsql_mnesia / 3af8e6a
Reports root/ big
OK: 3496 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 3af8e6a
Reports root/ big
OK: 1845 / Failed: 0 / User-skipped: 354 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 3af8e6a
Reports root/ big
OK: 3496 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 3af8e6a
Reports root/ big
OK: 1745 / Failed: 1 / User-skipped: 460 / Auto-skipped: 0

mod_ping_SUITE:server_ping:server_ping_pong
{error,{{badmatch,[{[<<"localhost">>,mod_ping,ping_response],
          {expected_diff,5},
          {before_story,0},
          {after_story,4}}]},
    [{escalus_mongooseim,post_story_check_metrics,1,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
                {line,74}]},
     {escalus_mongooseim,maybe_check_metrics_post_story,1,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
                {line,51}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,75}]},
     {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


mysql_redis_25 / mysql_redis / 3af8e6a
Reports root/ big
OK: 3502 / Failed: 1 / User-skipped: 102 / Auto-skipped: 0

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

Report log


riak_mnesia_24 / riak_mnesia / 3af8e6a
Reports root/ big
OK: 1994 / Failed: 0 / User-skipped: 350 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 3af8e6a
Reports root/ big
OK: 3496 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review July 7, 2022 08:29
- Use introspection to gather all possible commands
- Generate query docs and store them in a persistent term
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jul 7, 2022

small_tests_24 / small_tests / 2b49ec4
Reports root / small


small_tests_25 / small_tests / 2b49ec4
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 2b49ec4
Reports root/ big
OK: 3122 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 2b49ec4
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 2b49ec4
Reports root/ big
OK: 3105 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 2b49ec4
Reports root/ big
OK: 3122 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 2b49ec4
Reports root/ big
OK: 1739 / Failed: 0 / User-skipped: 460 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 2b49ec4
Reports root/ big
OK: 3122 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 2b49ec4
Reports root/ big
OK: 1845 / Failed: 0 / User-skipped: 354 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 2b49ec4
Reports root/ big
OK: 2135 / Failed: 0 / User-skipped: 355 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 2b49ec4
Reports root/ big
OK: 3496 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 2b49ec4
Reports root/ big
OK: 3491 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 2b49ec4
Reports root/ big
OK: 1994 / Failed: 0 / User-skipped: 350 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 2b49ec4
Reports root/ big
OK: 3496 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

Copy link
Contributor

@Premwoik Premwoik left a comment

Choose a reason for hiding this comment

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

Fantastic that it's possible to build queries dynamically 😀 I like the idea of using introspection. I forgot about this possibility.

@chrzaszcz chrzaszcz changed the base branch from master to graphql-cli July 7, 2022 14:16
@chrzaszcz chrzaszcz changed the base branch from graphql-cli to feature/graphql-cli July 7, 2022 14:18
Copy link
Contributor

@Premwoik Premwoik left a comment

Choose a reason for hiding this comment

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

👌🏻

@@ -7,7 +7,7 @@
-spec input(Type, Value) -> {ok, Coerced} | {error, Reason}
when
Type :: binary(),
Value :: binary(),
Value :: binary() | pos_integer(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we can have more types here. Any value passed as a scalar is verified in this function. Thus it can be also an integer, float, bool, etc.

Copy link
Member Author

@chrzaszcz chrzaszcz Jul 7, 2022

Choose a reason for hiding this comment

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

That's right, and I think that Value and Coerced types should be swapped for output vs input?

@Premwoik Premwoik merged commit 18ad8e3 into feature/graphql-cli Jul 7, 2022
@Premwoik Premwoik deleted the graphql-cli-poc branch July 7, 2022 14:32
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants