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

C2s code cleanup #3959

Merged
merged 6 commits into from
Feb 9, 2023
Merged

C2s code cleanup #3959

merged 6 commits into from
Feb 9, 2023

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Feb 8, 2023

This PR cleans up some minor leftovers of the old c2s, and finishes renaming Handler to ModState, which was done incompletely.

More details in commit messages.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 83.53% // Head: 83.51% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (cb60d77) compared to base (997ce8c).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3959      +/-   ##
==========================================
- Coverage   83.53%   83.51%   -0.03%     
==========================================
  Files         538      538              
  Lines       34003    34003              
==========================================
- Hits        28406    28396      -10     
- Misses       5597     5607      +10     
Impacted Files Coverage Δ
src/ejabberd_sm.erl 88.92% <ø> (ø)
src/c2s/mongoose_c2s.erl 87.35% <75.00%> (ø)
src/c2s/mongoose_c2s_acc.erl 84.78% <100.00%> (ø)
src/event_pusher/mod_event_pusher_sns.erl 82.19% <0.00%> (-12.33%) ⬇️
src/domain/service_domain_db.erl 83.33% <0.00%> (-2.09%) ⬇️
src/pubsub/node_pep.erl 77.77% <0.00%> (-1.86%) ⬇️
src/inbox/mod_inbox_rdbms_async.erl 70.58% <0.00%> (-1.48%) ⬇️
src/pubsub/mod_pubsub.erl 73.29% <0.00%> (-0.19%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/domain/mongoose_domain_loader.erl 90.17% <0.00%> (+0.89%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

There is no check_incoming_accum_for_conflicts anymore,
and this test cannot reach that functionality, because it was extracted
to mod_stream_management.
There was a function called 'wait_for_registration', that called
the non-existing old c2s module.

It was supposed to wait for the sm session, but actually the presence
is sent by the server after creating the session, not before as the
comment said.

Thus, it was enough to disable the filter predicate for Alice's
presences, and just handle them the same way as for other users.
It is module-specific state.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Feb 9, 2023

small_tests_24 / small_tests / cb60d77
Reports root / small


small_tests_25 / small_tests / cb60d77
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / cb60d77
Reports root/ big
OK: 4169 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / cb60d77
Reports root/ big
OK: 2219 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / cb60d77
Reports root/ big
OK: 2219 / Failed: 0 / User-skipped: 825 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / cb60d77
Reports root/ big
OK: 4166 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / cb60d77
Reports root/ big
OK: 4143 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / cb60d77
Reports root/ big
OK: 4549 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / cb60d77
Reports root/ big
OK: 4169 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / cb60d77
Reports root/ big
OK: 2559 / Failed: 0 / User-skipped: 654 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / cb60d77
Reports root/ big
OK: 2721 / Failed: 0 / User-skipped: 662 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / cb60d77
Reports root/ big
OK: 2361 / Failed: 0 / User-skipped: 683 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / cb60d77
Reports root/ big
OK: 4549 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / cb60d77
Reports root/ big
OK: 4535 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / cb60d77
Reports root/ big
OK: 4544 / Failed: 2 / User-skipped: 100 / Auto-skipped: 0

inbox_extensions_SUITE:regular:one_to_one:pagination:can_paginate_forwards
{error,
 {{inbox_size,3,
   [{times,1,
   {error,
    #{check_params => #{},error => function_clause,
    expected_items =>
     [#{content => <<"Msg 3">>,
      from => <<"alice_can_paginate_forwards_1577@localhost/res1">>,
      to => <<"mike_can_paginate_forwards_1577@localhost/res1">>,
      unread => 0,verify => #Fun<inbox_helper.28.35890797>},
      #{content => <<"Msg 2">>,
      from => <<"alice_can_paginate_forwards_1577@localhost/res1">>,
      to => <<"kate_can_paginate_forwards_1577@localhost/res1">>,
      unread => 0,verify => #Fun<inbox_helper.28.35890797>},
      #{content => <<"Msg 1">>,
      from => <<"alice_can_paginate_forwards_1577@localhost/res1">>,
      to => <<"bob_can_paginate_forwards_1577@localhost/res1">>,
      unread => 0,verify => #Fun<inbox_helper.28.35890797>}],
    inbox_items =>
     [<<"<message from='alice_can_paginate_forwards_1577@localhost' to='alice_can_paginate_forwards_1577@localhost/res1' id='1675-927918-356703'><result xmlns='erlang-solutions.com:xmpp:inbox:0' unread='0' queryid='f938df08ec82ad423f2f731cb6e46645'><forwarded xmlns='urn:xmpp:forward:0'><delay xmlns='urn:xmpp:delay' stamp='2023-02-09T07:31:58.339253Z'/><message from='alice_can_paginate_forwards_1577@localhost/res1' to='mike_can_paginate_forwards_1577@localhost/res1' type='chat' xmlns='jabber:client'><body>Msg 3</body></message></forwarded><read>true</read><box>inbox</box><archive>false</archive><mute>0</mute></result></message>">>,
      <<"<message from='alice_can_...

Report log

service_mongoose_system_metrics_SUITE:system_metrics_are_reported_to_configurable_google_analytics
{error,
  {{assertEqual,
     [{module,service_mongoose_system_metrics_SUITE},
      {line,470},
      {expression,"ActualTrackingIds"},
      {expected,[<<"UA-151671255-1">>,<<"UA-EXTRA-TRACKING-ID">>]},
      {value,[<<"UA-151671255-1">>]}]},
   [{service_mongoose_system_metrics_SUITE,
      events_are_reported_to_tracking_ids,1,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,470}]},
    {service_mongoose_system_metrics_SUITE,
      system_metrics_are_reported_to_configurable_google_analytics,1,
      [{file,
         "/home/circleci/project/big_tests/tests/service_mongoose_system_metrics_SUITE.erl"},
       {line,204}]},
    {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


mssql_mnesia_25 / odbc_mssql_mnesia / cb60d77
Reports root/ big
OK: 4546 / Failed: 0 / User-skipped: 100 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review February 9, 2023 08:14
Copy link
Collaborator

@NelsonVides NelsonVides left a comment

Choose a reason for hiding this comment

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

LGTM 👌🏽

Copy link
Collaborator

@DenysGonchar DenysGonchar left a comment

Choose a reason for hiding this comment

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

looks fine

@DenysGonchar DenysGonchar merged commit ec9f47c into master Feb 9, 2023
@DenysGonchar DenysGonchar deleted the c2s-code-cleanup branch February 9, 2023 14:27
@jacekwegr jacekwegr added this to the 6.1.0 milestone Apr 27, 2023
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.

5 participants