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 maps for mongoose_wpool options #3645

Merged
merged 17 commits into from
May 13, 2022
Merged

Use maps for mongoose_wpool options #3645

merged 17 commits into from
May 13, 2022

Commits on May 12, 2022

  1. Use maps with defaults in outgoing pool options

    - Refactor wpool options to use the new utlitity merge_sections/2
    - Store connection options in maps
    - Remove unnecessary conversions and changes of keys
    - Fix rabbit options - they did not work before, as no 'amqp_'
      prefixes were expected in the resulting config.
    - Rename rootdn to root_dn - same as in the resulting options
    - Add 'max_start_interval' to rdbms - there was code for handling it,
      but the option was missing from the spec.
    - Add missing resuired keys for some pools.
    - Make some implicit defaults explicit.
    
    See the following commits for the pool-specific counterparts of this change.
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    2229b7b View commit details
    Browse the repository at this point in the history
  2. Fix type spec

    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    97885f7 View commit details
    Browse the repository at this point in the history
  3. Update mongoose_wpool_rdbms

    Expect connection options in a map
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    4820e58 View commit details
    Browse the repository at this point in the history
  4. Update mongoose_rdbms and its backends

    - Expect connection options and server options in maps
    - Add type specs: one with generic options and one per backend
    - Minimize changes in TLS options for now
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    3fa014c View commit details
    Browse the repository at this point in the history
  5. Update mongoose_wpool_http

    Expect original keys from the spec: 'host' and 'tls'
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    ea9226e View commit details
    Browse the repository at this point in the history
  6. Update mongoose_wpool_redis

    Add type specs
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    c074f72 View commit details
    Browse the repository at this point in the history
  7. Update mongoose_wpool_riak

    - Expect TLS options with the original 'tls' key.
    - Expect credential in the original format.
    
    The previous two-phase processing was too complicated.
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    2cd2028 View commit details
    Browse the repository at this point in the history
  8. Update mongoose_wpool_cassandra

    Expect options in the original format (in maps).
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    7c3cc73 View commit details
    Browse the repository at this point in the history
  9. Update mongoose_wpool_elastic

    Simplify option processing
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    9e762d2 View commit details
    Browse the repository at this point in the history
  10. Update mongoose_wpool_rabbit

    - Rename 'host' to 'host_type'
    - Expect options without the 'amqp_' prefixes which actually did not work
      (there was no conversion)
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    cc57c9c View commit details
    Browse the repository at this point in the history
  11. Update mongoose_wpool_ldap

    - Use options directly to initialize state
    - Get rid of the 'encrypt' option - 'tls' is enough and more
      consistent with other pools
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    5d755b4 View commit details
    Browse the repository at this point in the history
  12. Update pool config option helpers

    - Update option format and default values
    - Replace the custom merging function with a generic recursive one
      This way any section with subsections can by specified by providing
      only the extra options.
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    2440123 View commit details
    Browse the repository at this point in the history
  13. Update the test TOML config for pools

    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    1f09fe3 View commit details
    Browse the repository at this point in the history
  14. Update config parser tests

    - Rearrange pool tests to check options from one section in one test case
    - Add missing tests for elastic
    - Check wpool options for all pool types (they sometimes change)
    - Use paths (P ++ [Key]) for all checks
    - Rework 'compare_nodes' to be more generic and consistent.
      Only TLS options require unordered list comparisons now.
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    e05f130 View commit details
    Browse the repository at this point in the history
  15. Update pool config in small tests

    Use the 'config/2' helper to merge options with defaults.
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    0c31ce1 View commit details
    Browse the repository at this point in the history
  16. Update pool config in big tests

    - Update the format of changed options
    - Use the config/2 helper to merge options with defaults
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    3ca4b61 View commit details
    Browse the repository at this point in the history
  17. Update the docs for outgoing pools

    - Update the format of changed options
    - Put ODBS after PGSQL/MySQL, as it is less common
    - Mention required options explicitly
    - Add changed options to the migration guide
    Paweł Chrząszcz committed May 12, 2022
    Configuration menu
    Copy the full SHA
    8316f89 View commit details
    Browse the repository at this point in the history