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 features small optimisation #4077

Merged
merged 2 commits into from
Aug 4, 2023
Merged

C2S features small optimisation #4077

merged 2 commits into from
Aug 4, 2023

Conversation

NelsonVides
Copy link
Collaborator

Two things here:

  • First is that the hook c2s_stream_features can already take the initial list of pre-created features as an argument, instead of giving an empty list and then appending two lists. This way, the initial list can also be picked up from subsequent handlers and modified – which SASL2 will do with SASL1 ascribed earlier.
  • cyrsasl:listmech/1 output is given to mongoose_c2s:filter_mechanism/1 twice, once in c2s itself, and another one when creating the features in c2s_stanza. Unify them.

This way we can reduce a little bit the duplication of filtering code
between c2s and c2s_stanzas
@mongoose-im
Copy link
Collaborator

mongoose-im commented Aug 4, 2023

small_tests_24 / small_tests / 4650328
Reports root / small


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 4650328
Reports root/ big
OK: 369 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_25_arm64 / small_tests / 4650328
Reports root / small


small_tests_25 / small_tests / 4650328
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 4650328
Reports root/ big
OK: 2258 / Failed: 0 / User-skipped: 827 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 4650328
Reports root/ big
OK: 4221 / Failed: 0 / User-skipped: 82 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 4650328
Reports root/ big
OK: 2258 / Failed: 0 / User-skipped: 827 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 4650328
Reports root/ big
OK: 4195 / Failed: 0 / User-skipped: 108 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 4650328
Reports root/ big
OK: 4604 / Failed: 0 / User-skipped: 89 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4650328
Reports root/ big
OK: 4221 / Failed: 0 / User-skipped: 82 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 4650328
Reports root/ big
OK: 4218 / Failed: 0 / User-skipped: 85 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 4650328
Reports root/ big
OK: 2404 / Failed: 0 / User-skipped: 681 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 4650328
Reports root/ big
OK: 4604 / Failed: 0 / User-skipped: 89 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 4650328
Reports root/ big
OK: 4590 / Failed: 0 / User-skipped: 103 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 4650328
Reports root/ big
OK: 4601 / Failed: 0 / User-skipped: 92 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03% 🎉

Comparison is base (36493bc) 83.87% compared to head (4650328) 83.91%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4077      +/-   ##
==========================================
+ Coverage   83.87%   83.91%   +0.03%     
==========================================
  Files         527      527              
  Lines       33150    33152       +2     
==========================================
+ Hits        27806    27819      +13     
+ Misses       5344     5333      -11     
Files Changed Coverage Δ
src/c2s/mongoose_c2s.erl 87.71% <100.00%> (ø)
src/c2s/mongoose_c2s_stanzas.erl 100.00% <100.00%> (+2.32%) ⬆️
src/hooks/mongoose_hooks.erl 94.90% <100.00%> (ø)

... and 6 files with indirect coverage changes

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

@NelsonVides NelsonVides marked this pull request as ready for review August 4, 2023 09:21
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.

👍

@chrzaszcz chrzaszcz merged commit b27f3bd into master Aug 4, 2023
4 checks passed
@chrzaszcz chrzaszcz deleted the c2s_features branch August 4, 2023 10:31
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 fine, probably would use Mech variable instead of M.

@chrzaszcz chrzaszcz added this to the 6.2.0 milestone Dec 11, 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.

4 participants