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

adding dynamic domains support to mod_ping #3136

Merged
merged 8 commits into from
May 31, 2021

Conversation

DenysGonchar
Copy link
Collaborator

@DenysGonchar DenysGonchar commented May 28, 2021

This PR introduces dynamic domains support for mod_ping.
Service discovery doesn't work for dynamic domains (as mod_disco doesn't support it yet), but still works correctly for statically configured domains

for a local testing you can use these commands:

test-runner.sh --skip-small-tests --skip-cover --preset pgsql_mnesia --skip-stop-nodes -- mod_ping
test-runner.sh --skip-small-tests --skip-cover --preset pgsql_mnesia --skip-stop-nodes --spec dynamic_domains.spec -- mod_ping

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #3136 (16e37f7) into master (fa8766c) will increase coverage by 0.02%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3136      +/-   ##
==========================================
+ Coverage   79.46%   79.48%   +0.02%     
==========================================
  Files         395      395              
  Lines       32196    32197       +1     
==========================================
+ Hits        25584    25592       +8     
+ Misses       6612     6605       -7     
Impacted Files Coverage Δ
src/metrics/mongoose_metrics.erl 96.10% <ø> (ø)
src/mod_ping.erl 93.93% <96.42%> (-1.38%) ⬇️
src/ejabberd_c2s.erl 89.28% <100.00%> (+0.05%) ⬆️
src/mod_commands.erl 93.83% <100.00%> (ø)
src/mongoose_hooks.erl 92.35% <100.00%> (+0.04%) ⬆️
src/wpool/mongoose_wpool.erl 84.00% <0.00%> (-1.00%) ⬇️
src/muc_light/mod_muc_light.erl 83.69% <0.00%> (-0.86%) ⬇️
src/ejabberd_sm.erl 84.17% <0.00%> (-0.68%) ⬇️
...c/global_distrib/mod_global_distrib_server_mgr.erl 76.83% <0.00%> (-0.57%) ⬇️
src/mod_roster.erl 76.62% <0.00%> (-0.24%) ⬇️
... and 2 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 fa8766c...16e37f7. Read the comment docs.

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.

I think it's pretty much ready to merge, I just have some minor comments in the meantime 👌🏽

big_tests/tests/mod_ping_SUITE.erl Outdated Show resolved Hide resolved
src/mod_ping.erl Show resolved Hide resolved
src/mod_ping.erl Show resolved Hide resolved
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.

Lokks good in general, but I have a few comments.

big_tests/tests/mod_ping_SUITE.erl Outdated Show resolved Hide resolved
@@ -18,6 +18,7 @@
%% so that we rein the "bag of things" approach
{hosts, [{mim, [{node, mongooseim@localhost},
{domain, <<"localhost">>},
{host_type, <<"localhost">>},
Copy link
Member

Choose a reason for hiding this comment

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

This isn't necessary, see below.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather have it defined like that, not as rpc-s.

Copy link
Member

Choose a reason for hiding this comment

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

For me it's better to have one helper that consistently reads it from mongoose_domain_core instead of defining it multiple times for multiple hosts. Anyway, as the helper is already there, let's use it consistently. This way we can change the implementation later when needed.

big_tests/tests/mod_ping_SUITE.erl Outdated Show resolved Hide resolved
src/mod_ping.erl Show resolved Hide resolved
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. The only thing that could be done would be the removal of host type from test.config.

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.

Excellent work 👌🏽

@NelsonVides NelsonVides merged commit 29c4865 into master May 31, 2021
@NelsonVides NelsonVides deleted the updating-mod_ping-module branch May 31, 2021 17:02
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants