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

Upgrade mongoose jid #3525

Merged
merged 4 commits into from
Apr 27, 2022
Merged

Upgrade mongoose jid #3525

merged 4 commits into from
Apr 27, 2022

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Jan 31, 2022

Using code from esl/mongoose_jid#7. Needs still releasing the new mongoose_jid to hex and cleaning the rebar.lock files accordingly.

As described in that other PR:

Remove fields that should actually never be used. The idea is that the
non-normalised parts MUST actually have never been used for comparison,
and are therefore not really needed. If only for printing and using them
in the to and from attributes of a stanza, clients SHOULD also
stringprep anyway, so the fact that the server might provide
non-normalised strings might be a problem for clients who're not
enforced to normalise them.
I've also been verifying how many other XMPP implementations tackle this
issue, and I've seen many other servers, and also a bunch of client
frameworks, simply capturing the parts and normalising them, and
building data structures that keep only their normalised pieces.

@mongoose-im

This comment has been minimized.

@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #3525 (b9dc81d) into master (c53ce7a) will increase coverage by 0.04%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##           master    #3525      +/-   ##
==========================================
+ Coverage   81.02%   81.07%   +0.04%     
==========================================
  Files         427      427              
  Lines       31965    31959       -6     
==========================================
+ Hits        25899    25910      +11     
+ Misses       6066     6049      -17     
Impacted Files Coverage Δ
src/admin_extra/service_admin_extra_roster.erl 87.41% <ø> (ø)
src/jingle_sip/jingle_sip_helper.erl 70.58% <0.00%> (ø)
src/mod_muc_log.erl 63.21% <0.00%> (ø)
src/mod_sic.erl 76.47% <ø> (ø)
...rc/mongoose_client_api/mongoose_client_api_sse.erl 57.89% <0.00%> (ø)
src/smart_markers/mod_smart_markers.erl 95.55% <ø> (ø)
src/mod_register.erl 74.87% <66.66%> (ø)
src/admin_extra/service_admin_extra_stanza.erl 93.75% <100.00%> (ø)
src/ejabberd_c2s.erl 88.71% <100.00%> (+0.06%) ⬆️
...t_pusher/mod_event_pusher_push_plugin_defaults.erl 94.73% <100.00%> (ø)
... and 36 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 c53ce7a...b9dc81d. Read the comment docs.

@mongoose-im

This comment has been minimized.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

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.

It looks good in general. however, it's difficult to tell how all the changes would affect the system, I guess that we might see the lowercase versions in some stanzas generated by the system?

rebar.config Outdated Show resolved Hide resolved
@NelsonVides
Copy link
Collaborator Author

It looks good in general. however, it's difficult to tell how all the changes would affect the system, I guess that we might see the lowercase versions in some stanzas generated by the system?

I'm happy you reviewed this one, but this is a draft of a different jid change :D

What needs review first is this one, with plenty of refactorings and stuff but no functional change whatsoever: esl/mongoose_jid#6

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@NelsonVides NelsonVides marked this pull request as ready for review April 26, 2022 15:36
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Apr 27, 2022

small_tests_23 / small_tests / b9dc81d
Reports root / small


small_tests_24 / small_tests / b9dc81d
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / b9dc81d
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / b9dc81d
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / b9dc81d
Reports root/ big
OK: 2843 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / b9dc81d
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / b9dc81d
Reports root/ big
OK: 2860 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / b9dc81d
Reports root/ big
OK: 1547 / Failed: 0 / User-skipped: 360 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / b9dc81d
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / b9dc81d
Reports root/ big
OK: 1854 / Failed: 0 / User-skipped: 368 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / b9dc81d
Reports root/ big
OK: 3234 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / b9dc81d
Reports root/ big
OK: 3240 / Failed: 1 / User-skipped: 147 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_1878@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_1878@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"UCSIS3eTxzLWzzGRLDZGYQ==">>}],
            [{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,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_24 / odbc_mssql_mnesia / b9dc81d
Reports root/ big
OK: 3234 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / b9dc81d
Reports root/ big
OK: 1697 / Failed: 0 / User-skipped: 367 / Auto-skipped: 0

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 👍

@chrzaszcz chrzaszcz merged commit 72db059 into master Apr 27, 2022
@chrzaszcz chrzaszcz deleted the upgrade_mongoose_jid branch April 27, 2022 15:08
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 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.

4 participants