Skip to content

Rework internal database validation#4667

Draft
chrzaszcz wants to merge 4 commits intomasterfrom
refactor-internal-database-validation
Draft

Rework internal database validation#4667
chrzaszcz wants to merge 4 commits intomasterfrom
refactor-internal-database-validation

Conversation

@chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Mar 6, 2026

Rework internal database backends check

  1. Make code less verbose
  2. Skip the erroneous omission of anonymous mnesia auth backend

The second item required making the config consistent:

  • Firstly between anonymous.localhost and anonymous,
  • Then between mim1 and mim2. I also decided to make it consistent with mim3 to prevent future test failures.

More details in commit messages.

Notes:

  • The tests were passing without the anonymous mnesia auth backend set for dynamic domains only because we don't test CETS with dynamic domains. I think we should change this - but in another task, because other tests might break.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 6, 2026

CircleCI results for 768b930


dynamic_domains_pgsql_mnesia_legacy / pgsql_mnesia / e1f2716
Status: 🔴 Failed
Reports root/ big
OK: 438 / Failed: 4 / User-skipped: 39 / Auto-skipped: 0


ldap_mnesia_legacy / ldap_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 2300 / Failed: 0 / User-skipped: 1341 / Auto-skipped: 0


pgsql_mnesia_legacy / pgsql_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 5511 / Failed: 0 / User-skipped: 158 / Auto-skipped: 0


ldap_mnesia_latest / ldap_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 2300 / Failed: 0 / User-skipped: 1341 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_latest / pgsql_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 5160 / Failed: 0 / User-skipped: 137 / Auto-skipped: 0


mysql_redis_latest / mysql_redis / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 44 / Failed: 0 / User-skipped: 0 / Auto-skipped: 0


dynamic_domains_mysql_redis_latest / mysql_redis / e1f2716
Status: 🔴 Failed
Reports root/ big
OK: 5123 / Failed: 1 / User-skipped: 173 / Auto-skipped: 0

metrics_session_SUITE:session:login_many
{error,{{badrpc,timeout},
    [{escalus_rpc,call_with_cookie_match,
            [mongooseim@localhost,ejabberd_admin,register,
             [<<"alicE_login_many_3427">>,<<"domain.example.com">>,
            <<"matygrysa">>],
             3000,mongooseim],
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
             {line,35}]},
     {lists,foreach_1,2,[{file,"lists.erl"},{line,2641}]},
     {escalus_ejabberd,create_users,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
              {line,224}]},
     {escalus_fresh,create_users,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,62}]},
     {escalus_fresh,story,3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,27}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1305}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1237}]}]}}

Report log


cockroachdb_cets_latest / cockroachdb_cets / e2eb2f0
Status: 🟢 Passed
Reports root/ big
OK: 5223 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


elasticsearch_and_cassandra_latest / elasticsearch_and_cassandra_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 683 / Failed: 0 / User-skipped: 72 / Auto-skipped: 0


pgsql_mnesia_latest / pgsql_mnesia / e2eb2f0
Status: 🔴 Failed
Reports root/ big
OK: 5510 / Failed: 1 / User-skipped: 158 / Auto-skipped: 0

connect_SUITE:just_tls:starttls_required:starttls_required_parallel:auth_bind_pipelined_starttls_skipped_error
{error,
  {thrown,
    {{timeout,wait_for_features},
     [{escalus_connection,receive_stanza,2,
        [{file,
           "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_connection.erl"},
         {line,312}]},
      {escalus_session,stream_features,2,
        [{file,
           "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_session.erl"},
         {line,190}]},
      {connect_SUITE,auth_bind_pipelined_starttls_skipped_error,1,
        [{file,
           "/home/circleci/project/big_tests/tests/connect_SUITE.erl"},
         {line,615}]},
      {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1796}]},
      {test_server,run_test_case_eval1,6,
        [{file,"test_server.erl"},{line,1305}]},
      {test_server,run_test_case_eval,9,
        [{file,"test_server.erl"},{line,1237}]}]}}}

Report log


internal_mnesia_latest / internal_mnesia / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 2449 / Failed: 0 / User-skipped: 1192 / Auto-skipped: 0


pgsql_cets_latest / pgsql_cets / e1f2716
Status: 🟢 Passed
Reports root/ big
OK: 5223 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


small_tests_legacy / small_tests / e1f2716
Reports root / small


small_tests_latest / small_tests / e1f2716
Reports root / small


small_tests_latest_arm64 / small_tests / e1f2716
Reports root / small

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.66%. Comparing base (9f29f10) to head (e1f2716).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4667   +/-   ##
=======================================
  Coverage   85.65%   85.66%           
=======================================
  Files         549      549           
  Lines       33216    33204   -12     
=======================================
- Hits        28452    28445    -7     
+ Misses       4764     4759    -5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Make code less verbose
- Skip the erroneous omission of anonymous mnesia auth backend
@chrzaszcz chrzaszcz force-pushed the refactor-internal-database-validation branch from 768b930 to afa4736 Compare March 9, 2026 09:19
@chrzaszcz chrzaszcz changed the title [WIP] Refactor internal database validation Rework internal database validation Mar 9, 2026
@chrzaszcz chrzaszcz force-pushed the refactor-internal-database-validation branch 3 times, most recently from 29f05f2 to 42c9fc1 Compare March 9, 2026 13:54
It was inconsistent:
- anonymous.localhost was using the default module list
- anonymous (currently untested) was using only 'mod_presence',
  but only for mim1 - for other nodes, it was the default list

The best action is to use the default module list for all nodes.
@chrzaszcz chrzaszcz force-pushed the refactor-internal-database-validation branch 4 times, most recently from 2fc98e5 to e2eb2f0 Compare March 9, 2026 14:06
After correctly enabling CETS for the 'anonymous' host type on mim1,
CETS cluster tests were failing because of missing tables on mim2.

The solutions was to add the 'anonymous' host type for mim2,
and set the anonymous auth backend to 'cets'.

For the sake of consistency, I also did it for mim3.
@chrzaszcz chrzaszcz force-pushed the refactor-internal-database-validation branch from e2eb2f0 to e1f2716 Compare March 9, 2026 14:06
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