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

User friendly errors for internal databases #4192

Merged
merged 4 commits into from
Dec 28, 2023

Conversation

jacekwegr
Copy link
Contributor

@jacekwegr jacekwegr commented Dec 15, 2023

This PR updates how messages are displayed when an internal database isn't loaded. The messages have been simplified and made more user-friendly. This was done by introducing a new option in the GraphQL @use directive. With this option, it can be specified which internal databases are needed for certain commands. Additionally, the messages now provide more specific information about which kind of dependencies are not loaded.

@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5b8fd70) 84.24% compared to head (0ff0376) 84.30%.
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4192      +/-   ##
==========================================
+ Coverage   84.24%   84.30%   +0.05%     
==========================================
  Files         551      551              
  Lines       33473    33483      +10     
==========================================
+ Hits        28201    28228      +27     
+ Misses       5272     5255      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from 3f1e2fa to ec13427 Compare December 15, 2023 11:40
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from 89e8a92 to bd3a314 Compare December 15, 2023 15:19
@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from bd3a314 to 6b45de0 Compare December 15, 2023 15:26
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr marked this pull request as ready for review December 18, 2023 08:12
Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

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

added some comments, looks ok

#{modules := Modules, services := Services} = UseCtx = prepare_use_dir_args(Args),
UseCtx#{modules => Modules0 ++ Modules, services => Services0 ++ Services};
aggregate_use_ctx(Args, #{use_dir := #{modules := Modules0, services := Services0,
internal_databases := DB0}}) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Databases would be easier to read here

Copy link
Member

@chrzaszcz chrzaszcz Dec 18, 2023

Choose a reason for hiding this comment

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

@arcusfelis You mean Databases instead of DB, right?

Extra = #{not_loaded_modules => Modules, not_loaded_services => Services},
-spec filter_unloaded_db([binary()]) -> [binary()].
filter_unloaded_db(DBs) ->
lists:filter(fun(DB) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

could have a helper function is_database_loaded (or is_database_unloaded) which would return boolean.

MsgList = string:join(NotLoadedDescs, " and "),
MsgBinaryList = list_to_binary(MsgList),
Msg = <<MsgPrefix/binary, MsgBinaryList/binary, " are not loaded">>,
Extra = maps:from_list(
Copy link
Contributor

Choose a reason for hiding this comment

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

that looks kinda complicated, you construct [{"modules", Modules}, {"services", Services}, {"internal databases", Databases}] list twice.

Consider code which is easier to grep for:

Extra = [{not_loaded_modules, Modules},
         {not_loaded_services, Services},
         {not_loaded_internal_databases, Databases}],
maps:from_list(skip_empty(Extra)),

....

skip_empty(Extra) ->
      [KV || KV = {_, V = [_ | _]} <- Extra].

OR you can just construct non-empty pairs and use them for both formatting description and formatting extra:

Pairs = [{"modules", Modules}, {"services", Services}, {"internal databases", Databases}],
NonEmpty = skip_empty(Pairs),
Msg = format_not_loaded_message(NonEmpty),
Extra = format_not_loaded_extra(NonEmpty),

(And use your logic inside these two helper functions)

Copy link
Member

@chrzaszcz chrzaszcz Dec 18, 2023

Choose a reason for hiding this comment

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

Here is my take: I would firstly rewrite handle_directive to create the NotLoaded list only once:

    Items = [{modules, filter_unloaded_modules(UseCtx, Ctx, Modules)},
             {services, filter_unloaded_services(Services)},
             {internal_databases, filter_unloaded_db(DB)}],
    case lists:filter(fun({_, List}) -> List =/= [] end, Items) of
        [] ->
            Field;
        NotLoaded ->
            Fun = resolve_not_loaded_fun(NotLoaded),
            Field#schema_field{resolve = Fun}
    end.

Then, this function can be split like this:

resolve_not_loaded_fun(NotLoaded) ->
    Msg = not_loaded_message(NotLoaded),
    Extra = maps:from_list([{error_key(Item), L} || {Item, L} <- NotLoaded]),
    fun(_, _, _, _) -> mongoose_graphql_helper:make_error(deps_not_loaded, Msg, Extra) end.

not_loaded_message(NotLoaded) ->
    MsgPrefix = <<"Some of the required ">>,
    MsgList = string:join([item_to_string(Item) || {Item, _} <- NotLoaded], " and "),
    MsgBinaryList = list_to_binary(MsgList),
    <<MsgPrefix/binary, MsgBinaryList/binary, " are not loaded">>.

item_to_string(Item) ->
    string:replace(atom_to_list(Item), "_", " ").

error_key(Item) ->
    list_to_atom("not_loaded" ++ atom_to_list(Item)).

Feel free to use it or not - it's just an idea.

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 in general. I added some comments.

Config1 = graphql_helper:init_domain_admin_handler(Config),
skip_if_cets_not_configured(Config1);
init_per_group(cets_not_configured, Config) ->
case rpc_call(mongoose_config, get_opt, [[internal_databases, cets], undefined]) of
Copy link
Member

Choose a reason for hiding this comment

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

Please use lookup_opt

end.

end_per_suite(Config) ->
ensure_bad_node_unregistered(),
escalus:end_per_suite(Config).
case rpc_call(mongoose_config, get_opt, [[internal_databases, cets, backend], undefined]) of
Copy link
Member

Choose a reason for hiding this comment

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

Please use lookup_opt

end_per_group(_, _Config) ->
graphql_helper:clean(),
escalus_fresh:clean().

skip_if_cets_not_configured(Config) ->
case rpc_call(mongoose_config, get_opt, [[internal_databases, cets, backend], undefined]) of
Copy link
Member

Choose a reason for hiding this comment

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

Please use lookup_opt

Config1 = graphql_helper:init_domain_admin_handler(Config),
skip_if_mnesia_not_configured(Config1);
init_per_group(mnesia_not_configured, Config) ->
case rpc_call(mongoose_config, get_opt, [[internal_databases, mnesia], undefined]) of
Copy link
Member

Choose a reason for hiding this comment

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

Please use lookup_opt

end_per_group(_, _Config) ->
graphql_helper:clean(),
escalus_fresh:clean().

skip_if_mnesia_not_configured(Config) ->
case rpc_call(mongoose_config, get_opt, [[internal_databases, mnesia], undefined]) of
Copy link
Member

Choose a reason for hiding this comment

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

Please use lookup_opt

#{code := deps_not_loaded,
not_loaded_internal_databases := [<<"db_x">>]},
message := <<"Some of the required internal databases are not loaded">>,
path := [<<"catD">>, <<"command2">>]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
path := [<<"catD">>, <<"command2">>]
path := [<<"catD">>, <<"command2">>]

Comment on lines +1039 to +1040
message := <<"Some of the required internal databases are not loaded">>,
path := [<<"catD">>, <<"command2">>]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
message := <<"Some of the required internal databases are not loaded">>,
path := [<<"catD">>, <<"command2">>]
message := <<"Some of the required internal databases are not loaded">>,
path := [<<"catD">>, <<"command2">>]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the indentation is correct in this structure, as the message and path elements are at the same nesting level as extensions.

use_dir_auth_admin_db_not_loaded(Config) ->
Doc = <<"{ catD { command2 } }">>,
Ctx = #{user => jid:make_bare(<<"admin">>, <<"localhost">>)},
{Ast, Ctx2} = check_directives(Config, Ctx, Doc),
Copy link
Member

Choose a reason for hiding this comment

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

A bunch of lines repeated from the previous test case, maybe use a helper function?

#{code := deps_not_loaded,
not_loaded_modules := [<<"mod_x">>],
not_loaded_internal_databases := [<<"db_x">>]},
message :=
Copy link
Member

Choose a reason for hiding this comment

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

Indentation?

not_loaded_services := [<<"service_x">>],
not_loaded_internal_databases := [<<"db_x">>]},
message := <<"Some of the required services and internal databases are not loaded">>,
path := [<<"catD">>, <<"command3">>]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
path := [<<"catD">>, <<"command3">>]
path := [<<"catD">>, <<"command3">>]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the message element is incorrectly indented here. It should be on the same nesting level as path and extensions.

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from e51f852 to e41fa60 Compare December 21, 2023 16:36
@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from e41fa60 to 28e6a75 Compare December 22, 2023 11:06
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 22, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 28e6a75
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / 28e6a75
Reports root / small


small_tests_26 / small_tests / 28e6a75
Reports root / small


small_tests_26_arm64 / small_tests / 28e6a75
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 28e6a75
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 856 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 28e6a75
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 856 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 28e6a75
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 144 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 28e6a75
Reports root/ big
OK: 4240 / Failed: 1 / User-skipped: 111 / Auto-skipped: 0

sm_SUITE:ping_timeout
{error,{noproc,{gen_server,call,[<0.15726.2>,get_sm_h]}}}

Report log


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 28e6a75
Reports root/ big
OK: 4237 / Failed: 1 / User-skipped: 114 / Auto-skipped: 0

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}]}]}}

Report log


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 28e6a75
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 28e6a75
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 716 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 28e6a75
Reports root/ big
OK: 4227 / Failed: 0 / User-skipped: 177 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 28e6a75
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 118 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 28e6a75
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 139 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 28e6a75
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 118 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 28e6a75
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 121 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 28e6a75
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 28e6a75
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0

graphql_muc_light_SUITE:admin_cli:admin_muc_light:end_per_group
{error,
 {{unregistering_failed,
   {amount,2},
   {unregistered_items,
  [{{<<"_admin_invite_user_errors_1186">>,
     [{escalus_event_mgr,<0.24212.0>},
    {tc_name,admin_invite_user_errors},
    {escalus_cleaner,<0.24211.0>},
    {watchdog,<0.24210.0>},
    {muc_light_host,<<"muclight.domain.example.com">>},
    {secondary_muc_light_host,<<"muclight.domain.example.org">>},
    {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/4192/204382/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40d86e0c24cf55.2023-12-22_12.45.05/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-22_12.50.07/graphql_muc_light_suite.admin_invite_user_errors.50306.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/4192/204382/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40d86e0c24cf55.2023-12-22_12.45.05/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-22_12.50.07/log_private/"},
    {{saved_modules,mongooseim@localhost,<<"test type">>},
     #{mod_vcard =>
      #{matches => 30,
        host => {prefix,<<"vjud.">>},
        search => true,backend => rdbms,iqdi...

Report log

graphql_muc_light_SUITE:domain_admin:domain_admin_muc_light:end_per_group
{error,
 {{unregistering_failed,
   {amount,1},
   {unregistered_items,
  [{{<<"_domain_admin_kick_user_no_permission_1231">>,
     [{escalus_event_mgr,<0.24892.0>},
    {tc_name,domain_admin_kick_user_no_permission},
    {escalus_cleaner,<0.24891.0>},
    {watchdog,<0.24890.0>},
    {muc_light_host,<<"muclight.domain.example.com">>},
    {secondary_muc_light_host,<<"muclight.domain.example.org">>},
    {protocol,http},
    {domain_admin,{<<"[email protected]">>,<<"333b22eaa362f08d">>}},
    {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/4192/204382/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40d86e0c24cf55.2023-12-22_12.45.05/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-22_12.50.07/graphql_muc_light_suite.domain_admin_kick_user_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/4192/204382/odbc_mssql_mnesia.26.1.2-amd64/big/ct_run.test%40d86e0c24cf55.2023-12-22_12.45.05/big_tests.tests.graphql_muc_light_SUITE.logs/run.2023-12-22_12.50.07/log_private/"},
    {{saved_modules,mongooseim@localhost,<<"test type">>},
 ...

Report log

Copy link
Contributor

@arcusfelis arcusfelis 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, just added a couple of comments to make code easier to read when jumping into it randomly :)

Items = [{modules, filter_unloaded_modules(UseCtx, Ctx, Modules)},
{services, filter_unloaded_services(Services)},
{internal_databases, filter_unloaded_db(DB)}],
case lists:filter(fun({_, List}) -> List =/= [] end, Items) of
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case lists:filter(fun({_, List}) -> List =/= [] end, Items) of
case lists:filter(fun({_, Names}) -> Names =/= [] end, Items) of

mongoose_config:lookup_opt([internal_databases,
binary_to_existing_atom(DB)]) == {error, not_found}.

-spec resolve_not_loaded_fun([{dependency_type(), [binary()]}]) -> resolver().
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add type:

-type dependency_name() :: binary().
Suggested change
-spec resolve_not_loaded_fun([{dependency_type(), [binary()]}]) -> resolver().
-spec resolve_not_loaded_fun([{dependency_type(), [dependency_name()]}]) -> resolver().

-spec resolve_not_loaded_fun([{dependency_type(), [binary()]}]) -> resolver().
resolve_not_loaded_fun(NotLoaded) ->
Msg = not_loaded_message(NotLoaded),
Extra = maps:from_list([{error_key(Item), L} || {Item, L} <- NotLoaded]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Extra = maps:from_list([{error_key(Item), L} || {Item, L} <- NotLoaded]),
Extra = maps:from_list([{error_key(Type), Names} || {Type, Names} <- NotLoaded]),

<<MsgPrefix/binary, MsgBinaryList/binary, " are not loaded">>.

-spec item_to_string(dependency_type()) -> [string()].
item_to_string(Item) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

Item is too generic (it could be confusing that it is dependency type not dependency name).
Just reuse type names when naming functions:

Suggested change
item_to_string(Item) ->
dependency_type_to_string(Type) ->

And below too, use Type instead of Item.

@jacekwegr jacekwegr force-pushed the user-friendly-errors-internal-dbs branch from 28e6a75 to 0ff0376 Compare December 22, 2023 16:52
@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 22, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 0ff0376
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / 0ff0376
Reports root / small


small_tests_26 / small_tests / 0ff0376
Reports root / small


small_tests_26_arm64 / small_tests / 0ff0376
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 0ff0376
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 856 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 0ff0376
Reports root/ big
OK: 4208 / Failed: 0 / User-skipped: 144 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 0ff0376
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 0ff0376
Reports root/ big
OK: 2270 / Failed: 0 / User-skipped: 856 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 0ff0376
Reports root/ big
OK: 4241 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 0ff0376
Reports root/ big
OK: 4236 / Failed: 2 / User-skipped: 114 / Auto-skipped: 0

auth_methods_for_c2s_SUITE:two_methods_enabled:cannot_login_with_not_allowed_method
{error,
  {"Expected stream features, got {xmlel,<<\"stream:error\">>,[],\n                  [{xmlel,<<\"host-unknown\">>,\n                     [{<<\"xmlns\">>,\n                     <<\"urn:ietf:params:xml:ns:xmpp-streams\">>}],\n                     []}]}",
   [{escalus_session,assert_stream_features,3,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
       {line,291}]},
    {escalus_session,stream_features,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
       {line,190}]},
    {escalus_connection,connection_step,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
       {line,161}]},
    {lists,foldl_1,3,[{file,"lists.erl"},{line,1599}]},
    {escalus_connection,start,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
       {line,145}]},
    {auth_methods_for_c2s_SUITE,cannot_login_with_not_allowed_method,1,
      [{file,
         "/home/circleci/project/big_tests/tests/auth_methods_for_c2s_SUITE.erl"},
       {line,73}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]}]}}

Report log

auth_methods_for_c2s_SUITE:two_methods_enabled:can_login_with_allowed_method
{error,
  {"Expected stream features, got {xmlel,<<\"stream:error\">>,[],\n                  [{xmlel,<<\"host-unknown\">>,\n                     [{<<\"xmlns\">>,\n                     <<\"urn:ietf:params:xml:ns:xmpp-streams\">>}],\n                     []}]}",
   [{escalus_session,assert_stream_features,3,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
       {line,291}]},
    {escalus_session,stream_features,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
       {line,190}]},
    {escalus_connection,connection_step,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
       {line,161}]},
    {lists,foldl_1,3,[{file,"lists.erl"},{line,1599}]},
    {escalus_connection,start,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
       {line,145}]},
    {auth_methods_for_c2s_SUITE,can_login_with_allowed_method,1,
      [{file,
         "/home/circleci/project/big_tests/tests/auth_methods_for_c2s_SUITE.erl"},
       {line,69}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1302}]}]}}

Report log


internal_mnesia_26 / internal_mnesia / 0ff0376
Reports root/ big
OK: 2410 / Failed: 0 / User-skipped: 716 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 0ff0376
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 118 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 0ff0376
Reports root/ big
OK: 4609 / Failed: 0 / User-skipped: 139 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 0ff0376
Reports root/ big
OK: 4227 / Failed: 0 / User-skipped: 177 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 0ff0376
Reports root/ big
OK: 4630 / Failed: 0 / User-skipped: 118 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 0ff0376
Reports root/ big
OK: 4613 / Failed: 14 / User-skipped: 121 / Auto-skipped: 0

mim_c2s_SUITE:basic:stream_from_does_not_match_sasl_jid_results_in_stream_error
{error,{{badrpc,timeout},
    [{escalus_rpc,call_with_cookie_match,
            [mongooseim@localhost,ejabberd_admin,register,
             [<<"alicE_stream_from_does_not_match_sasl_jid_results_in_stream_error_11">>,
            <<"localhost">>,<<"matygrysa">>],
             3000,mongooseim],
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
             {line,34}]},
     {lists,foreach_1,2,[{file,"lists.erl"},{line,1686}]},
     {escalus_ejabberd,create_users,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
              {line,211}]},
     {escalus_fresh,create_users,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,62}]},
     {escalus_fresh,create_fresh_user,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,112}]},
     {mim_c2s_SUITE,stream_from_does_not_match_sasl_jid_results_in_stream_error,
            1,
            [{file,"/home/circleci/project/big_tests/tests/mim_c2s_SUITE.erl"},
             {line,98}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1793}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1302}]}]}}

Report log

mim_c2s_SUITE:basic:two_users_can_log_and_chat
{error,{{badrpc,timeout},
    [{escalus_rpc,call_with_cookie_match,
            [mongooseim@localhost,ejabberd_admin,register,
             [<<"alicE_two_users_can_log_and_chat_13">>,
            <<"localhost">>,<<"matygrysa">>],
             3000,mongooseim],
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
             {line,34}]},
     {lists,foreach_1,2,[{file,"lists.erl"},{line,1686}]},
     {escalus_ejabberd,create_users,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
              {line,211}]},
     {escalus_fresh,create_users,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,62}]},
     {escalus_fresh,story,3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,27}]},
     {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}]}]}}

Report log

mim_c2s_SUITE:basic:message_sent_to_malformed_jid_results_in_error
{error,{{badrpc,timeout},
    [{escalus_rpc,call_with_cookie_match,
            [mongooseim@localhost,ejabberd_admin,register,
             [<<"bOb_message_sent_to_malformed_jid_results_in_error_12">>,
            <<"localhost">>,<<"makrolika">>],
             3000,mongooseim],
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
             {line,34}]},
     {lists,foreach_1,2,[{file,"lists.erl"},{line,1686}]},
     {escalus_ejabberd,create_users,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
              {line,211}]},
     {escalus_fresh,create_users,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,62}]},
     {escalus_fresh,story,3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,27}]},
     {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}]}]}}

Report log

accounts_SUITE:utilities:user_info:list_users
{error,{{assertEqual,[{module,accounts_SUITE},
            {line,361},
            {expression,"lists : sort ( rpc ( mim ( ) , ejabberd_auth , get_vh_registered_users , [ domain ( ) ] ) )"},
            {expected,[{<<"alice">>,<<"localhost">>},
                 {<<"bob">>,<<"localhost">>}]},
            {value,[{<<"alice">>,<<"localhost">>},
                {<<"alice_message_sent_to_malformed_jid_results_in_error_12">>,
                 <<"localhost">>},
                {<<"alice_stream_from_does_not_match_sasl_jid_results_in_stream_error_11">>,
                 <<"localhost">>},
                {<<"alice_two_users_can_log_and_chat_13">>,
                 <<"localhost">>},
                {<<"bob">>,<<"localhost">>},
                {<<"bob_message_sent_to_malformed_jid_results_in_error_12">>,
                 <<"localhost">>}]}]},
    [{accounts_SUITE,list_users,1,
             [{file,"/home/circleci/project/big_tests/tests/accounts_SUITE.erl"},
              {line,361}]},
     {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}]}]}}

Report log

accounts_SUITE:utilities:user_info:count_users
{error,{{assertEqual,[{module,accounts_SUITE},
            {line,378},
            {expression,"rpc ( mim ( ) , ejabberd_auth , get_vh_registered_users_number , [ domain ( ) ] )"},
            {expected,2},
            {value,6}]},
    [{accounts_SUITE,count_users,1,
             [{file,"/home/circleci/project/big_tests/tests/accounts_SUITE.erl"},
              {line,378}]},
     {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}]}]}}

Report log

accounts_SUITE:utilities:user_info:count_selected_users
{error,{{assertEqual,[{module,accounts_SUITE},
            {line,386},
            {expression,"rpc ( mim ( ) , ejabberd_auth , get_vh_registered_users_number , [ domain ( ) , [ { prefix , << \"a\" >> } ] ] )"},
            {expected,1},
            {value,4}]},
    [{accounts_SUITE,count_selected_users,1,
             [{file,"/home/circleci/project/big_tests/tests/accounts_SUITE.erl"},
              {line,386}]},
     {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}]}]}}

Report log

accounts_SUITE:utilities:user_info:list_selected_users
{error,{{assertEqual,[{module,accounts_SUITE},
            {line,369},
            {expression,"rpc ( mim ( ) , ejabberd_auth , get_vh_registered_users , [ domain ( ) , [ { from , 2 } , { to , 10 } ] ] )"},
            {expected,[{<<"bob">>,<<"localhost">>}]},
            {value,[{<<"alice_message_sent_to_malformed_jid_results_in_error_12">>,
                 <<"localhost">>},
                {<<"alice_stream_from_does_not_match_sasl_jid_results_in_stream_error_11">>,
                 <<"localhost">>},
                {<<"alice_two_users_can_log_and_chat_13">>,
                 <<"localhost">>},
                {<<"bob">>,<<"localhost">>},
                {<<"bob_message_sent_to_malformed_jid_results_in_error_12">>,
                 <<"localhost">>}]}]},
    [{accounts_SUITE,list_selected_users,1,
             [{file,"/home/circleci/project/big_tests/tests/accounts_SUITE.erl"},
              {line,369}]},
     {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}]}]}}

Report log

graphql_account_SUITE:admin_account_http:admin_register_user_limit_error
{error,
  {{badmap,null},
   [{erlang,map_get,
      [<<"message">>,null],
      [{error_info,#{module => erl_erts_errors}}]},
    {graphql_helper,get_value,2,
      [{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
       {line,292}]},
    {graphql_account_SUITE,admin_register_user_limit_error,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_account_SUITE.erl"},
       {line,385}]},
    {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}]}]}}

Report log

graphql_account_SUITE:admin_account_cli:admin_register_user_limit_error
{error,
  {#{what => invalid_response_code,expected_type => ok,
     response_code => {exit_status,1}},
   [{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_account_SUITE,admin_register_user_limit_error,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_account_SUITE.erl"},
       {line,385}]},
    {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}]}]}}

Report log

graphql_account_SUITE:domain_admin_account:admin_register_user_limit_error
{error,
  {{badmap,null},
   [{erlang,map_get,
      [<<"message">>,null],
      [{error_info,#{module => erl_erts_errors}}]},
    {graphql_helper,get_value,2,
      [{file,"/home/circleci/project/big_tests/tests/graphql_helper.erl"},
       {line,292}]},
    {graphql_account_SUITE,admin_register_user_limit_error,1,
      [{file,
         "/home/circleci/project/big_tests/tests/graphql_account_SUITE.erl"},
       {line,385}]},
    {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}]}]}}

Report log

graphql_last_SUITE:admin_http:admin_last_configured:admin_old_users:admin_list_old_users_domain
{error,{{badmatch,[#{<<"jid">> =>
             <<"alice_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_stream_from_does_not_match_sasl_jid_results_in_stream_error_11@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_two_users_can_log_and_chat_13@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> => <<"bob@localhost">>,
           <<"timestamp">> => <<"2023-12-22T17:04:36.000000Z">>},
           #{<<"jid">> =>
             <<"bob_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null}]},
    [{graphql_last_SUITE,admin_list_old_users_domain_story,3,
               [{file,"/home/circleci/project/big_tests/tests/graphql_last_SUITE.erl"},
                {line,388}]},
     {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}]}]}}

Report log

graphql_last_SUITE:admin_http:admin_last_configured:admin_old_users:admin_list_old_users_global
{error,{{badmatch,[#{<<"jid">> => <<"[email protected]">>,
           <<"timestamp">> => <<"2023-12-22T17:04:36.000000Z">>},
           #{<<"jid">> =>
             <<"alice_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_stream_from_does_not_match_sasl_jid_results_in_stream_error_11@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_two_users_can_log_and_chat_13@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> => <<"bob@localhost">>,
           <<"timestamp">> => <<"2023-12-22T17:04:36.000000Z">>},
           #{<<"jid">> =>
             <<"bob_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null}]},
    [{graphql_last_SUITE,admin_list_old_users_global_story,4,
               [{file,"/home/circleci/project/big_tests/tests/graphql_last_SUITE.erl"},
                {line,412}]},
     {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}]}]}}

Report log

graphql_last_SUITE:admin_http:admin_last_configured:admin_old_users:admin_remove_old_users_domain
{error,{{badmatch,[#{<<"jid">> =>
             <<"alice_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_stream_from_does_not_match_sasl_jid_results_in_stream_error_11@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> =>
             <<"alice_two_users_can_log_and_chat_13@localhost">>,
           <<"timestamp">> => null},
           #{<<"jid">> => <<"bob@localhost">>,
           <<"timestamp">> => <<"2023-12-22T17:04:36.000000Z">>},
           #{<<"jid">> =>
             <<"bob_message_sent_to_malformed_jid_results_in_error_12@localhost">>,
           <<"timestamp">> => null}]},
    [{graphql_last_SUITE,admin_remove_old_users_domain_story,4,
               [{file,"/home/circleci/project/big_tests/tests/graphql_last_SUITE.erl"},
                {line,340}]},
     {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}]}]}}

Report log

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}]}]}}

Report log


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 0ff0376
Reports root/ big
OK: 4238 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 0ff0376
Reports root/ big
OK: 4627 / Failed: 0 / User-skipped: 121 / Auto-skipped: 0

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

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

good

@arcusfelis arcusfelis merged commit 18d0bd5 into master Dec 28, 2023
4 checks passed
@arcusfelis arcusfelis deleted the user-friendly-errors-internal-dbs branch December 28, 2023 13:01
@jacekwegr jacekwegr added this to the 6.2.1 milestone Apr 3, 2024
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.

4 participants