-
Notifications
You must be signed in to change notification settings - Fork 428
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
Keep s2s options: 'outgoing', 'dns', 'address' in maps #3516
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #3516 +/- ##
==========================================
+ Coverage 80.99% 81.07% +0.07%
==========================================
Files 419 419
Lines 32310 32293 -17
==========================================
+ Hits 26169 26180 +11
+ Misses 6141 6113 -28
Continue to review full report at Codecov.
|
c6554af
to
d7de5a5
Compare
This comment has been minimized.
This comment has been minimized.
d7de5a5
to
ba73ca7
Compare
This comment has been minimized.
This comment has been minimized.
ba73ca7
to
26cf20d
Compare
This comment has been minimized.
This comment has been minimized.
26cf20d
to
3612b1a
Compare
This comment has been minimized.
This comment has been minimized.
37ddab4
to
376b640
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The spec needs to be split, because options with 'wrap = {host_config, *}' would be invalid in host_config, but they contain defaults, and would need to be always included. IP protocol versions are kept as a list of integers for simplicity.
- No double conversion of IP families anymore. - Options are expected to be always present.
Expect the new defaults for global options o be always present
Store addresses in maps, do a fold over all 3 lookup methods
376b640
to
8369f6f
Compare
small_tests_24 / small_tests / 8369f6f small_tests_23 / small_tests / 8369f6f dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8369f6f dynamic_domains_mysql_redis_24 / mysql_redis / 8369f6f dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 8369f6f dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 8369f6f ldap_mnesia_24 / ldap_mnesia / 8369f6f ldap_mnesia_23 / ldap_mnesia / 8369f6f internal_mnesia_24 / internal_mnesia / 8369f6f pgsql_mnesia_24 / pgsql_mnesia / 8369f6f mysql_redis_24 / mysql_redis / 8369f6f pgsql_mnesia_23 / pgsql_mnesia / 8369f6f mssql_mnesia_24 / odbc_mssql_mnesia / 8369f6f riak_mnesia_24 / riak_mnesia / 8369f6f small_tests_24 / small_tests / 8369f6f small_tests_23 / small_tests / 8369f6f dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 8369f6f dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 8369f6f dynamic_domains_mysql_redis_24 / mysql_redis / 8369f6f ldap_mnesia_24 / ldap_mnesia / 8369f6f rest_client_SUITE:messages:msg_is_sent_and_delivered_over_sse{error,{{badmap,{error,timeout}},
[{erlang,map_get,
[data,{error,timeout}],
[{error_info,#{module => erl_erts_errors}}]},
{rest_client_SUITE,msg_is_sent_and_delivered_over_sse,1,
[{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
{line,217}]},
{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}]}]}} dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 8369f6f ldap_mnesia_23 / ldap_mnesia / 8369f6f internal_mnesia_24 / internal_mnesia / 8369f6f pgsql_mnesia_24 / pgsql_mnesia / 8369f6f pgsql_mnesia_23 / pgsql_mnesia / 8369f6f elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 8369f6f mysql_redis_24 / mysql_redis / 8369f6f mssql_mnesia_24 / odbc_mssql_mnesia / 8369f6f riak_mnesia_24 / riak_mnesia / 8369f6f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok
|
||
|
||
-spec open_socket2(Type :: 'inet' | 'inet6', | ||
-spec open_socket2(Type :: inet | inet6, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: without open_socket1
there is only open_socket2
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just didn't think there was any rule here, because fun, fun2, fun3
... looks to me just as good as fun, fun1, fun2
. That's why I decided to minimize the change set.
These sections used to be converted from maps to top-level options. This PR gets rid of this conversion, keeping them in maps. The
address
option is now a map of maps, to be precise.Other changes:
Test coverage for s2s is poor because the uncovered code involves DNS lookup. I am not sure if it makes sense to cover it in this PR as it is quite tricky.
The next planned change would be to store the entire s2s section in a map, but it contains both global and host-specific options, so it is not possible without additional workarounds or making all options host-specific. I will try to evaluate what the best option is.