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

Internal config cleanup #3659

Merged
merged 3 commits into from
May 31, 2022
Merged

Internal config cleanup #3659

merged 3 commits into from
May 31, 2022

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented May 31, 2022

Get rid of config key renaming.

The ability to rename a TOML key to a different internal config key (top-level or nested) was added when the parsed TOML tree used to be converted to the legacy configuration format. However, we don't need it anymore now. Having the functionality would encourage renaming keys, but that would bring no real value and would make reasoning about the code and debugging more difficult.

@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #3659 (56a16ca) into master (de85082) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3659      +/-   ##
==========================================
- Coverage   81.15%   81.15%   -0.01%     
==========================================
  Files         433      433              
  Lines       31914    31911       -3     
==========================================
- Hits        25901    25896       -5     
- Misses       6013     6015       +2     
Impacted Files Coverage Δ
src/config/mongoose_config_spec.erl 100.00% <ø> (ø)
src/pubsub/mod_pubsub.erl 73.42% <ø> (ø)
src/config/mongoose_config_parser_toml.erl 99.17% <100.00%> (-0.02%) ⬇️
src/ejabberd_cowboy.erl 84.12% <100.00%> (ø)
src/elasticsearch/mongoose_elasticsearch.erl 76.92% <0.00%> (-7.70%) ⬇️
src/mam/mod_mam_elasticsearch_arch.erl 85.08% <0.00%> (-1.76%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.43% <0.00%> (-0.43%) ⬇️
src/mod_muc_room.erl 76.70% <0.00%> (-0.18%) ⬇️
src/mod_muc_log.erl 63.11% <0.00%> (ø)
src/pubsub/mod_pubsub_db_rdbms.erl 95.60% <0.00%> (+0.25%) ⬆️
... and 4 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 de85082...56a16ca. Read the comment docs.

@mongoose-im

This comment was marked as outdated.

Paweł Chrząszcz added 3 commits May 31, 2022 11:14
Motivation:
- Make the code easier to understand.
- Discourage renaming, which is counter-intuitive.
@mongoose-im
Copy link
Collaborator

mongoose-im commented May 31, 2022

small_tests_24 / small_tests / 56a16ca
Reports root / small


small_tests_23 / small_tests / 56a16ca
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / 56a16ca
Reports root/ big
OK: 2890 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 56a16ca
Reports root/ big
OK: 2907 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 56a16ca
Reports root/ big
OK: 2913 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

mod_ping_SUITE:server_ping_kill:server_ping_pong
{error,{{badmatch,[{[<<"test_type">>,mod_ping,ping_response],
          {expected_diff,5},
          {before_story,5},
          {after_story,9}}]},
    [{escalus_mongooseim,post_story_check_metrics,1,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
                {line,74}]},
     {escalus_mongooseim,maybe_check_metrics_post_story,1,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_mongooseim.erl"},
                {line,51}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,75}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1292}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1224}]}]}}

Report log


ldap_mnesia_23 / ldap_mnesia / 56a16ca
Reports root/ big
OK: 1508 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 56a16ca
Reports root/ big
OK: 2907 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 56a16ca
Reports root/ big
OK: 1508 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 56a16ca
Reports root/ big
OK: 1593 / Failed: 0 / User-skipped: 316 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 56a16ca
Reports root/ big
OK: 3281 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 56a16ca
Reports root/ big
OK: 1900 / Failed: 0 / User-skipped: 324 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 56a16ca
Reports root/ big
OK: 3276 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 56a16ca
Reports root/ big
OK: 3281 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 56a16ca
Reports root/ big
OK: 3293 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive
{error,{{assertion_failed,assert,is_groupchat_message,
              [<<"Restorable message">>],
              undefined,"undefined"},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {muc_SUITE,wait_for_mam_result,3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4383}]},
     {muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4124}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
          [{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
           {line,4120}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1292}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1224}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 56a16ca
Reports root/ big
OK: 1743 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review May 31, 2022 09:59
Copy link
Contributor

@Premwoik Premwoik 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 🎉

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.

Neat 👌🏽

@NelsonVides NelsonVides merged commit 2cb7d7d into master May 31, 2022
@NelsonVides NelsonVides deleted the internal-config-cleanup branch May 31, 2022 12:04
@Premwoik Premwoik added this to the 5.1.0 milestone Jun 6, 2022
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.

4 participants