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

Support for Erlang 26 #4121

Merged
merged 27 commits into from
Oct 5, 2023
Merged

Support for Erlang 26 #4121

merged 27 commits into from
Oct 5, 2023

Conversation

jacekwegr
Copy link
Contributor

@jacekwegr jacekwegr commented Sep 11, 2023

This PR updates the some parts of the code to work with the latest Erlang version.

Most of the adjustments are connected to this modification, but there are also a few small tweaks in tests and the source code.

Jobs rockylinux_8 and almalinux_8 on CircleCI continue to utilize OTP24 as there are no updates available for these platforms.

OTP version 26.0.2 is used instead of 26.1 because the gun library has a very long compilation time (exceeding 10 minutes) on the latter version.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (0bbe037) 83.92% compared to head (a19d783) 83.90%.
Report is 74 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4121      +/-   ##
==========================================
- Coverage   83.92%   83.90%   -0.02%     
==========================================
  Files         552      552              
  Lines       33630    33633       +3     
==========================================
- Hits        28225    28221       -4     
- Misses       5405     5412       +7     
Files Coverage Δ
src/gen_mod_deps.erl 97.10% <100.00%> (ø)
src/just_tls.erl 79.72% <100.00%> (ø)
src/gdpr_api.erl 92.75% <0.00%> (-2.77%) ⬇️
src/mongoose_lib.erl 84.93% <44.44%> (-3.96%) ⬇️

... and 12 files with indirect coverage changes

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

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr marked this pull request as ready for review September 11, 2023 15:07
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.

Looking very good! Tomorrow I'll run tests locally from this branch to check and continue helping from there, thanks for the effort 😄

src/gdpr_api.erl Outdated Show resolved Hide resolved
@@ -145,7 +146,8 @@
{transport, escalus_ws},
{ssl, true},
{port, 5285},
{wspath, <<"/ws-xmpp">>}]},
{wspath, <<"/ws-xmpp">>},
{ssl_opts, [{verify, verify_none}]}]},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Very smart idea 👌🏽

@mongoose-im

This comment was marked as outdated.

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 comments about path_helper

test/migration_scripts_SUITE.erl Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr marked this pull request as draft September 20, 2023 07:04
@mongoose-im

This comment was marked as outdated.

ciphers_available_in_os() ->
CiphersStr = os:cmd("openssl ciphers 'ALL:eNULL'"),
[string:strip(C, both, $\n) || C <- string:tokens(CiphersStr, ":")].

ciphers_working_with_ssl_clients(Config) ->
Port = c2s_port(Config),
Path = rpc(get_node(Port), os, getenv, ["PWD"]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

All right, nice! 👌🏽

src/gdpr_api.erl Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@jacekwegr jacekwegr changed the title Partial support for Erlang 26 Support for Erlang 26 Oct 2, 2023
@jacekwegr jacekwegr marked this pull request as ready for review October 2, 2023 12:28
@pawlooss1 pawlooss1 self-requested a review October 2, 2023 13:18
Copy link
Member

@pawlooss1 pawlooss1 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 ❤️ So much effort put into this one. I left one question.

Comment on lines 142 to 154
queued_messages_increase(_C) ->
Fun = fun(Value) ->
case Value of
[{fsm, 5}, {regular, 5}, {total, 10}] -> true;
[{fsm, 5}, {regular, 6}, {total, 11}] -> true;
_ -> false
end
end,
async_helper:wait_until(
fun() ->
{ok, L} = mongoose_metrics:get_metric_value(global, processQueueLengths),
lists:sort(L)
end,
[{fsm, 5}, {regular, 5}, {total, 10}]
).
end, Fun).
Copy link
Member

Choose a reason for hiding this comment

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

Were you able to investigate why the return value was non-deterministic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I forgot about it, but I should probably look into that. Thanks for pointing that out!

Copy link
Member

Choose a reason for hiding this comment

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

Thanks 🙂 I'd be better if we found the cause and fix it in the module/test setup instead of assertion.

@@ -65,7 +65,7 @@ add_deps(HostType, Modules) ->
%% @end
-spec resolve_deps(mongooseim:host_type(), module_map() | module_list()) -> module_map().
resolve_deps(HostType, Modules) when is_map(Modules) ->
resolve_deps(HostType, maps:to_list(Modules));
resolve_deps(HostType, lists:sort(maps:to_list(Modules)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

WOW, that was it 🤯

@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.

Copy link
Member

@pawlooss1 pawlooss1 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 5, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / a19d783
Reports root/ big
OK: 369 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_25 / small_tests / a19d783
Reports root / small


small_tests_26 / small_tests / a19d783
Reports root / small


small_tests_26_arm64 / small_tests / a19d783
Reports root / small


ldap_mnesia_25 / ldap_mnesia / a19d783
Reports root/ big
OK: 2276 / Failed: 0 / User-skipped: 833 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / a19d783
Reports root/ big
OK: 2276 / Failed: 0 / User-skipped: 833 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / a19d783
Reports root/ big
OK: 4205 / Failed: 0 / User-skipped: 116 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / a19d783
Reports root/ big
OK: 4234 / Failed: 0 / User-skipped: 87 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / a19d783
Reports root/ big
OK: 4237 / Failed: 0 / User-skipped: 84 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / a19d783
Reports root/ big
OK: 4237 / Failed: 0 / User-skipped: 84 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / a19d783
Reports root/ big
OK: 4626 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / a19d783
Reports root/ big
OK: 2422 / Failed: 0 / User-skipped: 687 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / a19d783
Reports root/ big
OK: 4596 / Failed: 0 / User-skipped: 121 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / a19d783
Reports root/ big
OK: 4623 / Failed: 0 / User-skipped: 94 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / a19d783
Reports root/ big
OK: 4626 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / a19d783
Reports root/ big
OK: 4606 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


small_tests_26_arm64 / small_tests / a19d783
Reports root / small

@pawlooss1 pawlooss1 merged commit 8307632 into master Oct 5, 2023
3 of 4 checks passed
@pawlooss1 pawlooss1 deleted the support-erlang-26 branch October 5, 2023 13:52
@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.

6 participants