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

Use 'format_items = map' by default for config sections #3655

Merged
merged 2 commits into from
May 27, 2022

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented May 25, 2022

Clean up item formatting:

  • For sections, use format_items = map by default.
  • For lists, use format_items = list by default.

Remove explicit format_items = map for all sections.
For sections that are formatted as lists, use format_items = list. Trivial cases are converted to maps in this PR.

@chrzaszcz chrzaszcz changed the base branch from master to tls-config-rework May 25, 2022 16:26
@mongoose-im
Copy link
Collaborator

mongoose-im commented May 25, 2022

small_tests_24 / small_tests / 1544b56
Reports root / small


small_tests_23 / small_tests / 1544b56
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 1544b56
Reports root/ big
OK: 2861 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 1544b56
Reports root/ big
OK: 2861 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 1544b56
Reports root/ big
OK: 2844 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 1544b56
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 402 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 1544b56
Reports root/ big
OK: 2861 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 1544b56
Reports root/ big
OK: 1506 / Failed: 0 / User-skipped: 402 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 1544b56
Reports root/ big
OK: 1854 / Failed: 0 / User-skipped: 369 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 1544b56
Reports root/ big
OK: 1547 / Failed: 0 / User-skipped: 361 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 1544b56
Reports root/ big
OK: 3235 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 1544b56
Reports root/ big
OK: 3230 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 1544b56
Reports root/ big
OK: 3234 / Failed: 1 / User-skipped: 142 / Auto-skipped: 0

dynamic_domains_SUITE:with_mod_dynamic_domains_test:iq_handling_for_subdomain
{error,
  {{assertion_failed,assert,is_iq_result,
     [{xmlel,<<"iq">>,
        [{<<"to">>,<<"subdomain2.example.test">>},
         {<<"type">>,<<"get">>},
         {<<"id">>,<<"ec56d7e5396492000047c7aaf7fe8d19">>}],
        [{xmlel,<<"query">>,[{<<"xmlns">>,<<"dummy.namespace">>}],[]}]}],
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"subdomain2.example.test">>},
        {<<"to">>,<<"[email protected]/res1">>},
        {<<"type">>,<<"error">>},
        {<<"xml:lang">>,<<"en">>},
        {<<"id">>,<<"ec56d7e5396492000047c7aaf7fe8d19">>}],
       [{xmlel,<<"query">>,[{<<"xmlns">>,<<"dummy.namespace">>}],[]},
        {xmlel,<<"error">>,
          [{<<"code">>,<<"404">>},{<<"type">>,<<"cancel">>}],
          [{xmlel,<<"remote-server-not-found">>,
             [{<<"xmlns">>,
             <<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],
             []},
           {xmlel,<<"text">>,
             [{<<"xmlns">>,
             <<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],
             [{xmlcdata,<<"From s2s (waiting)">>}]}]}]},
     "<iq from='subdomain2.example.test' to='[email protected]/res1' type='error' xml:lang='en' id='ec56d7e5396492000047c7aaf7fe8d19'><query xmlns='dummy.namespace'/><error code='404' type='cancel'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>From s2s (waiting)</text></error></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/project/big_tests/_build/default...

Report log


mssql_mnesia_24 / odbc_mssql_mnesia / 1544b56
Reports root/ big
OK: 3235 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 1544b56
Reports root/ big
OK: 1697 / Failed: 0 / User-skipped: 368 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #3655 (651e21a) into tls-config-rework (669c0ae) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@                  Coverage Diff                  @@
##           tls-config-rework    #3655      +/-   ##
=====================================================
- Coverage              81.13%   81.12%   -0.01%     
=====================================================
  Files                    433      433              
  Lines                  31910    31901       -9     
=====================================================
- Hits                   25889    25879      -10     
- Misses                  6021     6022       +1     
Impacted Files Coverage Δ
src/admin_extra/service_admin_extra.erl 100.00% <ø> (ø)
src/auth/ejabberd_auth_anonymous.erl 56.25% <ø> (ø)
src/auth/ejabberd_auth_dummy.erl 69.56% <ø> (ø)
src/auth/ejabberd_auth_external.erl 30.69% <ø> (ø)
src/auth/ejabberd_auth_jwt.erl 79.48% <ø> (ø)
src/auth/ejabberd_auth_rdbms.erl 57.22% <ø> (ø)
src/auth/ejabberd_auth_riak.erl 77.50% <ø> (ø)
src/domain/mongoose_domain_handler.erl 98.78% <ø> (ø)
src/domain/service_domain_db.erl 83.33% <ø> (ø)
src/event_pusher/mod_event_pusher_http.erl 94.87% <ø> (ø)
... and 64 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 669c0ae...651e21a. Read the comment docs.

- Lists should still have 'format_items = none' as default.
- Remove explicit 'format_items = map' for all sections.

For sections not converted yet:
- Convert to maps, if this is simple.
- For non-trivial cases, leave 'format_items = none' for now.
@mongoose-im
Copy link
Collaborator

mongoose-im commented May 26, 2022

small_tests_24 / small_tests / 5df2660
Reports root / small


small_tests_23 / small_tests / 5df2660
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / 5df2660
Reports root/ big
OK: 2889 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 5df2660
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 5df2660
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 5df2660
Reports root/ big
OK: 1507 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 5df2660
Reports root/ big
OK: 1507 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 5df2660
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 5df2660
Reports root/ big
OK: 1592 / Failed: 0 / User-skipped: 316 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 5df2660
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 5df2660
Reports root/ big
OK: 1899 / Failed: 0 / User-skipped: 324 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 5df2660
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 5df2660
Reports root/ big
OK: 3286 / Failed: 1 / User-skipped: 102 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,{{badmatch,[{xmlel,<<"presence">>,
              [{<<"from">>,
              <<"alice_unsubscribe_after_presence_unsubscription_1870@localhost/res1">>},
               {<<"to">>,
              <<"bob_unsubscribe_after_presence_unsubscription_1870@localhost/res1">>},
               {<<"type">>,<<"unavailable">>}],
              []}]},
    [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
          [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
           {line,384}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {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


mssql_mnesia_24 / odbc_mssql_mnesia / 5df2660
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 5df2660
Reports root/ big
OK: 1742 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0

- Rename 'none' to 'list' and make it accept only lists.
- Skip the 'process_items' step for options, which don't have items.
@mongoose-im
Copy link
Collaborator

mongoose-im commented May 26, 2022

small_tests_24 / small_tests / 651e21a
Reports root / small


small_tests_23 / small_tests / 651e21a
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 651e21a
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 651e21a
Reports root/ big
OK: 2889 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 651e21a
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 651e21a
Reports root/ big
OK: 2906 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 651e21a
Reports root/ big
OK: 1507 / Failed: 0 / User-skipped: 401 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 651e21a
Reports root/ big
OK: 1592 / Failed: 0 / User-skipped: 316 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 651e21a
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 651e21a
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 651e21a
Reports root/ big
OK: 1899 / Failed: 0 / User-skipped: 324 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 651e21a
Reports root/ big
OK: 3286 / Failed: 1 / User-skipped: 102 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_1889@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_1889@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"6LaP9vScvhCCkERFIvReXg==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {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


mssql_mnesia_24 / odbc_mssql_mnesia / 651e21a
Reports root/ big
OK: 3280 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 651e21a
Reports root/ big
OK: 1742 / Failed: 0 / User-skipped: 323 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review May 26, 2022 13:36
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 :)

Base automatically changed from tls-config-rework to master May 27, 2022 08:43
@arcusfelis arcusfelis merged commit a465408 into master May 27, 2022
@arcusfelis arcusfelis deleted the config-items-in-map branch May 27, 2022 08:47
@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