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

Feature/listeners #4452

Draft
wants to merge 65 commits into
base: master
Choose a base branch
from
Draft

Feature/listeners #4452

wants to merge 65 commits into from

Conversation

NelsonVides
Copy link
Collaborator

No description provided.

NelsonVides and others added 14 commits December 20, 2024 09:37
Note that components might register _any_ domain, even one not
necessarily provided by a static config or a dynamically configured one.
Hence it makes no sense to use the subdomains registration API as it was
described in a TODO in `mod_disco:get_external_components/2`.

Furthermore, when it comes to discovery, we want to leave all components
as discoverable, regardless of whether the component is a subdomain of a
static domain as it was previously done. The code filtering out
unrelated parent domains comes from long before MongooseIM 1.0.0, as
well as the option to set `extra_domains` to reenable visibility.
This option was used to make discoverable components that for a user
might not have been discoverable given the domain was unrelated. This
was so decided over a decade ago before MongooseIM 1.0.0, but I'd judge
a better solution is to leave components as either entirely discoverable
or entirely hidden by default, as components are usually dynamic and at
the same time fully controllable at the deployment, and we can now have
an infinite amount of domains for which a component can become a
subdomain and hard-coding "extra_domains" for each static or dynamic
domain is not feasible.
@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 83.71501% with 128 lines in your changes missing coverage. Please review.

Project coverage is 85.55%. Comparing base (6acae7b) to head (1d45385).

Files with missing lines Patch % Lines
src/component/mongoose_component_connection.erl 76.73% 47 Missing ⚠️
src/s2s/mongoose_s2s_socket_out.erl 76.51% 31 Missing ⚠️
src/s2s/mongoose_s2s_socket_in.erl 82.20% 21 Missing ⚠️
src/just_tls.erl 77.55% 11 Missing ⚠️
src/c2s/mongoose_c2s_ranch.erl 91.89% 3 Missing ⚠️
src/s2s/ejabberd_s2s_out.erl 81.25% 3 Missing ⚠️
src/component/mongoose_component_ranch.erl 90.90% 2 Missing ⚠️
src/listeners/mongoose_listener.erl 94.44% 2 Missing ⚠️
src/listeners/mongoose_listener_config.erl 71.42% 2 Missing ⚠️
src/s2s/mongoose_s2s_info.erl 80.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4452      +/-   ##
==========================================
+ Coverage   85.50%   85.55%   +0.04%     
==========================================
  Files         559      562       +3     
  Lines       34065    34083      +18     
==========================================
+ Hits        29128    29159      +31     
+ Misses       4937     4924      -13     

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

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 19, 2025

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / b828652
Reports root/ big
OK: 472 / Failed: 0 / User-skipped: 49 / Auto-skipped: 0


small_tests_26 / small_tests / b828652
Reports root / small


small_tests_27 / small_tests / b828652
Reports root / small


small_tests_27_arm64 / small_tests / b828652
Reports root / small


ldap_mnesia_26 / ldap_mnesia / b828652
Reports root/ big
OK: 2295 / Failed: 0 / User-skipped: 887 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / b828652
Reports root/ big
OK: 4675 / Failed: 0 / User-skipped: 152 / Auto-skipped: 0


ldap_mnesia_27 / ldap_mnesia / b828652
Reports root/ big
OK: 2295 / Failed: 0 / User-skipped: 902 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / b828652
Reports root/ big
OK: 2429 / Failed: 0 / User-skipped: 768 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / b828652
Reports root/ big
OK: 4705 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / b828652
Reports root/ big
OK: 4695 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / b828652
Reports root/ big
OK: 4710 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / b828652
Reports root/ big
OK: 4784 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / b828652
Reports root/ big
OK: 5064 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / b828652
Reports root/ big
OK: 4784 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / b828652
Reports root/ big
OK: 5070 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / b828652
Reports root/ big
OK: 5085 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / b828652
Reports root/ big
OK: 5077 / Failed: 1 / User-skipped: 131 / Auto-skipped: 2

last_SUITE:valid_queries:last_online_user
{error,
  {test_case_failed,
    {has_stanzas_but_shouldnt,
      {client,<<"alice_unnamed_3781@localhost/res1">>,escalus_tcp,
        <0.133762.0>,
        [{event_manager,<0.133761.0>},
         {server,<<"localhost">>},
         {username,<<"alicE_unnamed_3781">>},
         {resource,<<"res1">>}],
        [{event_client,
           [{event_manager,<0.133761.0>},
            {server,<<"localhost">>},
            {username,<<"alicE_unnamed_3781">>},
            {resource,<<"res1">>}]},
         {resource,<<"res1">>},
         {username,<<"alice_unnamed_3781">>},
         {server,<<"localhost">>},
         {host,<<"localhost">>},
         {port,5222},
         {auth,fun escalus_auth:auth_plain/2},
         {wspath,undefined},
         {username,<<"alicE_unnamed_3781">>},
         {server,<<"localhost">>},
         {password,<<"matygrysa">>},
         {stream_id,<<"5c635eb8758090d7">>}]},
      [{xmlel,<<"presence">>,
         [{<<"from">>,<<"bob_unnamed_3781@localhost/res1">>},
          {<<"to">>,<<"alice_unnamed_3781@localhost/res1">>}],
         []}]}}}

Report log


mssql_mnesia_27 / odbc_mssql_mnesia / b828652
Reports root/ big
OK: 6 / Failed: 0 / User-skipped: 0 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 20, 2025

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 63591f6
Reports root/ big
OK: 472 / Failed: 0 / User-skipped: 49 / Auto-skipped: 0


small_tests_26 / small_tests / 63591f6
Reports root / small


small_tests_27 / small_tests / 63591f6
Reports root / small


small_tests_27_arm64 / small_tests / 63591f6
Reports root / small


ldap_mnesia_26 / ldap_mnesia / 63591f6
Reports root/ big
OK: 2295 / Failed: 0 / User-skipped: 887 / Auto-skipped: 0


ldap_mnesia_27 / ldap_mnesia / 63591f6
Reports root/ big
OK: 2295 / Failed: 0 / User-skipped: 902 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / 63591f6
Reports root/ big
OK: 4675 / Failed: 0 / User-skipped: 152 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 63591f6
Reports root/ big
OK: 4695 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 63591f6
Reports root/ big
OK: 4710 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / 63591f6
Reports root/ big
OK: 2429 / Failed: 0 / User-skipped: 768 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / 63591f6
Reports root/ big
OK: 5064 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / 63591f6
Reports root/ big
OK: 4784 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 63591f6
Reports root/ big
OK: 4705 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / 63591f6
Reports root/ big
OK: 4784 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / 63591f6
Reports root/ big
OK: 5085 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / 63591f6
Reports root/ big
OK: 5080 / Failed: 0 / User-skipped: 131 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 63591f6
Reports root/ big
OK: 5070 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0

Note that now we can use `erlang:alias/1` to ensure that this message
doesn't come from anywhere else, so the `Ref` parameter is not needed to
ensure uniqueness. This allows us to unify the c2s preparing options
from all other submodules preparing so, and we can fix naming convention
by simply `make_client_opts` vs `make_server_opts`.

Note that the given `verify_fun` is just the default for the cases when
`verify_mode` is `peer` or `none`, so only for `selfsigned_peer` it is
needed to be provided explicitly. Also, the `verify_fun_wrapper` gets
quite more readable this way.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 21, 2025

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 829e566
Reports root/ big
OK: 471 / Failed: 1 / User-skipped: 49 / Auto-skipped: 0

gdpr_SUITE:retrieve_personal_data:retrieve_logs
{error,{{badmatch,{error,enoent}},
    [{gdpr_SUITE,'-retrieve_logs/1-fun-0-',2,
           [{file,"/home/circleci/project/big_tests/tests/gdpr_SUITE.erl"},
            {line,1546}]},
     {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,1794}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1303}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1235}]}]}}

Report log


small_tests_26 / small_tests / 829e566
Reports root / small


small_tests_27 / small_tests / 829e566
Reports root / small


small_tests_27_arm64 / small_tests / 829e566
Reports root / small


ldap_mnesia_26 / ldap_mnesia / 829e566
Reports root/ big
OK: 2294 / Failed: 1 / User-skipped: 1007 / Auto-skipped: 0

pubsub_SUITE:dag+node_config:send_last_published_item_test
{error,{{badmatch,false},
    [{pubsub_tools,check_response,2,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,445}]},
     {pubsub_tools,receive_response,3,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,435}]},
     {pubsub_tools,receive_and_check_response,4,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
            {line,425}]},
     {pubsub_SUITE,'-send_last_published_item_test/1-fun-0-',2,
             [{file,"/home/circleci/project/big_tests/tests/pubsub_SUITE.erl"},
            {line,923}]},
     {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,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


ldap_mnesia_27 / ldap_mnesia / 829e566
Reports root/ big
OK: 2295 / Failed: 0 / User-skipped: 1022 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / 829e566
Reports root/ big
OK: 2429 / Failed: 0 / User-skipped: 888 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / 829e566
Reports root/ big
OK: 4795 / Failed: 0 / User-skipped: 152 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 829e566
Reports root/ big
OK: 4815 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / 829e566
Reports root/ big
OK: 4904 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 829e566
Reports root/ big
OK: 4830 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 829e566
Reports root/ big
OK: 4825 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / 829e566
Reports root/ big
OK: 5205 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / 829e566
Reports root/ big
OK: 5184 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 829e566
Reports root/ big
OK: 5190 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / 829e566
Reports root/ big
OK: 4904 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / 829e566
Reports root/ big
OK: 5200 / Failed: 0 / User-skipped: 131 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 829e566
Reports root/ big
OK: 117 / Failed: 0 / User-skipped: 2 / Auto-skipped: 0


elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 829e566
Reports root/ big
OK: 40 / Failed: 0 / User-skipped: 16 / Auto-skipped: 0

Improve the consistency of just_tls helpers
@mongoose-im
Copy link
Collaborator

mongoose-im commented Jan 22, 2025

elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 1d45385
Reports root/ big
OK: 472 / Failed: 0 / User-skipped: 49 / Auto-skipped: 0


small_tests_27 / small_tests / 1d45385
Reports root / small


small_tests_26 / small_tests / 1d45385
Reports root / small


small_tests_27_arm64 / small_tests / 1d45385
Reports root / small


ldap_mnesia_26 / ldap_mnesia / 1d45385
Reports root/ big
OK: 2297 / Failed: 0 / User-skipped: 1007 / Auto-skipped: 0


ldap_mnesia_27 / ldap_mnesia / 1d45385
Reports root/ big
OK: 2297 / Failed: 0 / User-skipped: 1022 / Auto-skipped: 0


dynamic_domains_mysql_redis_27 / mysql_redis / 1d45385
Reports root/ big
OK: 4797 / Failed: 0 / User-skipped: 152 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 1d45385
Reports root/ big
OK: 4832 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


internal_mnesia_27 / internal_mnesia / 1d45385
Reports root/ big
OK: 2431 / Failed: 0 / User-skipped: 888 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 1d45385
Reports root/ big
OK: 4817 / Failed: 0 / User-skipped: 117 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 1d45385
Reports root/ big
OK: 4827 / Failed: 0 / User-skipped: 122 / Auto-skipped: 0


pgsql_cets_27 / pgsql_cets / 1d45385
Reports root/ big
OK: 4906 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


cockroachdb_cets_27 / cockroachdb_cets / 1d45385
Reports root/ big
OK: 4906 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


mysql_redis_27 / mysql_redis / 1d45385
Reports root/ big
OK: 5186 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_mnesia_27 / pgsql_mnesia / 1d45385
Reports root/ big
OK: 5207 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 1d45385
Reports root/ big
OK: 5192 / Failed: 0 / User-skipped: 126 / Auto-skipped: 0


mssql_mnesia_27 / odbc_mssql_mnesia / 1d45385
Reports root/ big
OK: 5202 / Failed: 0 / User-skipped: 131 / Auto-skipped: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants