-
Notifications
You must be signed in to change notification settings - Fork 422
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
Compile and test MongooseIM with Erlang/OTP 20 #1430
Conversation
apps/ejabberd/src/ejabberd_admin.erl
Outdated
{error, Reason} -> | ||
String = io_lib:format("Can't restore backup from ~p at node ~p: ~p", | ||
[filename:absname(Path), node(), Reason]), | ||
{cannot_restore, String}; | ||
{aborted, {no_exists, Table}} -> | ||
String = io_lib:format("Can't restore backup from ~p at node ~p: Table ~p does not exist.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 498 is too long: String = io_lib:format("Can't restore backup from ~p at node ~p: Table ~p does not exist.",.
24efde6
to
1f7e3ed
Compare
``` | ||
|
||
### Building MongooseIM with a custom OpenSSL | ||
|
||
Before running `./rebar3 compile` or `make rel` please export the CFLAGS and LDFLAGS env vars pointing to a FIPS compliant OpenSSL, f.e. | ||
If you want to use a different OpenSSL than the default one, before running `./rebar3 compile` or `make rel` please export the CFLAGS and LDFLAGS env vars pointing to a FIPS compliant OpenSSL, f.e. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use a custom OpenSSL, please export the CFLAGS and LDFLAGS env vars pointing to a FIPS compliant OpenSSL before running ./rebar3 compile
or make rel
.
F.e:
coverage decrease analysis analysed coverage decrease between base master commit and latest otp-20 commit
|
@DenysGonchar this is impressive what you've prepared! I'm wondering why there are these differences in coverage reports. Most of the modules didn't change in this PR... Maybe we can live with the way coverage is reported now? |
What are these lines that are suddenly not covered in the remaining files? |
Yes, coverage change in |
guys let me finish...
|
some comments on the changed files: ELDAPv3.erl and eldap_filter_yecc.erl are generated and there's no sense to analyse them, also we might want to exclude that modules from coverage analysis at all. mongoose_fips.erl - as mentioned above, otp20 has support of fips_mode so rebar adds the corresponding compilation flag, from here we have new lines. so far we don't have tests for fips_mode so decrease of coverage is expected. mongoose_client_api_sse.erl - uncovered lines are:
mod_aws_sns.erl - uncovered lines are:
mod_mam_odbc_prefs - uncovered lines are:
mod_mam_utils.elr - uncovered lines are:
mod_muc.erl - uncovered lines are:
mod_mam.erl - uncovered lines are:
mod_muc_log.erl - difference in coverage is weekdays clauses in get_dateweek/2 function, this is explained by the simple fact that tests were running in different weekdays. and for base commit node_flat.erl - difference in coverage caused by removed code in init/1, removed code is case block that has 2 clauses, one returns - ok, another one wasn't covered in base commit. so nothing to worry about. none of these looks critical to mePS: regarding the diff table in the comment above - original script to extract the data was made by @fenek (thank you, it saved a lot of time), i have just modified it a bit to generate markdown table. some time later i will create executable escript version of it, so it could be easily used by everyone who needs to analyse the coverage diffs |
Thanks @DenysGonchar the analysation you did is impressive. Looks like the decrease in coverage will not be harmful for us. Merging this PR now has bigger value then fighting with the coverage. The sad thing is that we'll have less 70% coverage again. There is a quick fix to this situation - merging #1216 :) |
i'm not 100% sure that it brings us back to 70+% but we can try exclude those generated files from coverage analysis. |
update deps to compile with Erlang/OTP 20 test all on travis with Erlang/OTP 20 update big tests to compile and run with Erlang/OTP 20 use wpool_sup to start and stop a pool in a consistent way use meck 0.8.6 to run small tests properly on Erlang/OTP 20 change crypto:rand_bytes to crypto:strong_rand_bytes use fips related function according to Erlang/OTP doc mnesia:delete_object always returns ok or throws exits signal matching on anything else than 'ok' doesn't make sense remove workarounds for Erlang older than 18 in tests Use Erlang/OTP 19.3 for most of the jobs One job with Erlang/OTP 18.3 and 20.0 Dialyzer job on Erlang/OTP 20.0 fix dialyzer warnings in mod_roster_mnesia fix dialyzer warning for ejabberd_admin module remove broken and not used mnesia update table logic fix dialyzer warning in ejabberd_app module run riak_mnesia preset with Erlang/OTP 18.3 instead of internal_mnesia we can do this trick because riak driver is 3rd party library and doesn't come with Erlang/OTP this changes gives additional benefits: * whole build is shorter by one job which is 30 minutes * converage on covaralls is not wrongly decreased because of the same result (as from other interl_mnesia job) spefiy min OTP version in rebar.config make elvis happy with line length documentation update
With this PR it's possible to compile and test MongooseIM with Erlang/OTP from 18 to 20
Proposed changes include:
worker_pool
crypt:rand_bytes
tostrong_rand_bytes
TODO:
login_SUITE
)