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

Multi tenancy config #3053

Merged
merged 11 commits into from
Mar 10, 2021
Merged

Multi tenancy config #3053

merged 11 commits into from
Mar 10, 2021

Conversation

DenysGonchar
Copy link
Collaborator

@DenysGonchar DenysGonchar commented Mar 8, 2021

This PR addresses #

  • parsing of the host_type configuration
  • init modules per host type
  • Extension of gen_mod behaviour with extra callback to define modules capabilities.
  • crashing if configured modules don’t support multi-tenancy.

see test/config_parser_SUITE_data/host_types.toml file for example of the new config format.

@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #3053 (2fee51f) into multi-tenancy-phase-1 (e5ec74a) will increase coverage by 0.06%.
The diff coverage is 96.36%.

Impacted file tree graph

@@                    Coverage Diff                    @@
##           multi-tenancy-phase-1    #3053      +/-   ##
=========================================================
+ Coverage                  78.05%   78.11%   +0.06%     
=========================================================
  Files                        374      374              
  Lines                      31200    31245      +45     
=========================================================
+ Hits                       24352    24406      +54     
+ Misses                      6848     6839       -9     
Impacted Files Coverage Δ
src/config/mongoose_config_parser.erl 88.88% <93.33%> (+8.88%) ⬆️
src/config/mongoose_config_parser_toml.erl 98.59% <100.00%> (+2.24%) ⬆️
src/config/mongoose_config_spec.erl 98.84% <100.00%> (+0.04%) ⬆️
src/gen_mod.erl 75.00% <100.00%> (+0.67%) ⬆️
...bal_distrib/mod_global_distrib_hosts_refresher.erl 73.58% <0.00%> (-3.78%) ⬇️
src/wpool/mongoose_wpool.erl 81.00% <0.00%> (-1.00%) ⬇️
src/ejabberd_s2s_out.erl 58.12% <0.00%> (-0.23%) ⬇️
src/ejabberd_c2s.erl 89.25% <0.00%> (-0.23%) ⬇️
src/mod_muc_room.erl 77.38% <0.00%> (-0.12%) ⬇️
src/mod_muc_log.erl 77.72% <0.00%> (ø)
... and 8 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 e5ec74a...2fee51f. Read the comment docs.

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.

Looking good, a few comments from me.

src/config/mongoose_config_spec.erl Outdated Show resolved Hide resolved
src/config/mongoose_config_spec.erl Outdated Show resolved Hide resolved
src/config/mongoose_config_spec.erl Outdated Show resolved Hide resolved
test/config_parser_SUITE.erl Outdated Show resolved Hide resolved
test/config_parser_SUITE.erl Outdated Show resolved Hide resolved
test/config_parser_SUITE.erl Outdated Show resolved Hide resolved
test/config_parser_SUITE.erl Outdated Show resolved Hide resolved
src/config/mongoose_config_parser_toml.erl Outdated Show resolved Hide resolved
src/config/mongoose_config_parser_toml.erl Show resolved Hide resolved
src/config/mongoose_config_spec.erl Outdated 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.

Looking good! Just a few minor comments.

src/config/mongoose_config_parser.erl Show resolved Hide resolved
src/config/mongoose_config_parser.erl Outdated Show resolved Hide resolved
test/config_parser_SUITE.erl Outdated Show resolved Hide resolved
src/config/mongoose_config_spec.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!

@chrzaszcz chrzaszcz merged commit 52b2473 into multi-tenancy-phase-1 Mar 10, 2021
@chrzaszcz chrzaszcz deleted the multi-tenancy-config branch March 10, 2021 16:34
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.

2 participants