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

cleaning up some issues with multitenancy support #3158

Merged
merged 9 commits into from
Jun 22, 2021

Conversation

DenysGonchar
Copy link
Collaborator

@DenysGonchar DenysGonchar commented Jun 17, 2021

this PR introduces the following changes:

  1. add verification of dynamic_domains feature support at gen_mod
  2. Add dynamic_domains support declaration for the modules tested with dynamic_domains.spec. Please note that these modules are dynamically enabled during the integration tests, there is no warranty that they are fully converted and tested properly with the current dynamic_domains.spec. We must create a follow-up ticket to recheck all of that modules, here is the list of them:
    • mod_mam
    • mod_mam_cache_user
    • mod_mam_meta - this one is not tested, but it's required for a normal MAM configuration through the TOML file
    • mod_mam_mnesia_prefs
    • mod_mam_muc
    • mod_mam_muc_cache_user
    • mod_mam_muc_rdbms_arch
    • mod_mam_muc_rdbms_async_pool_writer
    • mod_mam_rdbms_arch
    • mod_mam_rdbms_async_pool_writer
    • mod_mam_rdbms_prefs
    • mod_mam_rdbms_user
    • mod_muc
    • mod_muc_light
    • mod_muc_log
  3. minor fix for mod_domain_isolation.
  4. declaration of dynamic_domains support for 'mod_commands' and 'mod_muc_light_commands' modules. Quick check shows that these modules are converted, however there is no proper testing done for them. these 2 modules are changed mostly for alignment with bkpr's codebase.

@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #3158 (5943b7a) into master (78880e6) will increase coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3158      +/-   ##
==========================================
+ Coverage   79.82%   79.83%   +0.01%     
==========================================
  Files         396      396              
  Lines       32255    32266      +11     
==========================================
+ Hits        25748    25761      +13     
+ Misses       6507     6505       -2     
Impacted Files Coverage Δ
src/mam/mod_mam_meta.erl 93.68% <0.00%> (-1.00%) ⬇️
src/muc_light/mod_muc_light_commands.erl 90.36% <0.00%> (-1.11%) ⬇️
src/mod_commands.erl 93.19% <50.00%> (-0.64%) ⬇️
src/gen_mod.erl 74.00% <83.33%> (+0.38%) ⬆️
src/mam/mod_mam.erl 88.93% <100.00%> (+0.04%) ⬆️
src/mam/mod_mam_cache_user.erl 87.93% <100.00%> (+0.21%) ⬆️
src/mam/mod_mam_mnesia_prefs.erl 94.50% <100.00%> (+0.06%) ⬆️
src/mam/mod_mam_muc.erl 73.76% <100.00%> (+0.13%) ⬆️
src/mam/mod_mam_muc_cache_user.erl 68.05% <100.00%> (+0.44%) ⬆️
src/mam/mod_mam_muc_rdbms_arch.erl 94.84% <100.00%> (+0.05%) ⬆️
... and 21 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 78880e6...5943b7a. Read the comment docs.

to get the list of all the modules that miss declaration of dynamic_domains feature, run these commands:
   test-runner.sh --preset pgsql_mnesia --skip-cover --skip-small-tests --spec dynamic_domains.spec
   grep -r "dynamic_domains_feature_is_not_supported:" _build/*/rel/mongooseim/log | sed -E "s/.*dynamic_domains_feature_is_not_supported: ([^ ]*) .*/\1/" | sort -u
…ype if module doesn't explicitly declare support for this feature
@DenysGonchar DenysGonchar force-pushed the multi-tenancy-cleanup branch 2 times, most recently from 5ab429a to 5877191 Compare June 21, 2021 14:22
The @~2 commit is cherry-picked from beekeeper's repo. it addes declaration of dynamic_domains feature support to some modules. To see the full list of the changed modules use this command:
   git show --name-only  --pretty="format:" @~2 | sed -r "s_.*/(.*)\.erl_\1_p;d" | sort

The conversion of 'mod_commands' and 'mod_muc_light_commands' modules seems to be done, however there's no integration testing enabled for that modules in dynamic_domains.spec

Other modules (except mod_mam_meta) are dynamically initialised during the execution of the tests currently configured in dynamic_domains.spec, however there's no waranty that all of them are fully converted and tested. So ideally we should recheck all of them, here is the list of that modules:
 * mod_mam
 * mod_mam_cache_user
 * mod_mam_meta
 * mod_mam_mnesia_prefs
 * mod_mam_muc
 * mod_mam_muc_cache_user
 * mod_mam_muc_rdbms_arch
 * mod_mam_muc_rdbms_async_pool_writer
 * mod_mam_rdbms_arch
 * mod_mam_rdbms_async_pool_writer
 * mod_mam_rdbms_prefs
 * mod_mam_rdbms_user
 * mod_muc
 * mod_muc_light
 * mod_muc_log
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.

LGTM

@NelsonVides NelsonVides merged commit 18a65f6 into master Jun 22, 2021
@NelsonVides NelsonVides deleted the multi-tenancy-cleanup branch June 22, 2021 10:18
@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.

3 participants