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

Event pusher opts in a map #3603

Merged
merged 22 commits into from
Mar 25, 2022
Merged

Event pusher opts in a map #3603

merged 22 commits into from
Mar 25, 2022

Commits on Mar 24, 2022

  1. Update mod_event_pusher_hook_translator

    - Use host types
    - It is best to register hooks last, so it is better not to have
      a dependency, which is started first
    chrzaszcz committed Mar 24, 2022
    Configuration menu
    Copy the full SHA
    5dfa380 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2022

  1. Change the order of handlers for filter_local_packet

    The event_pusher one has to run before the inbox one to ensure that
    unread_count has not been yet updated by mod_inbox.
    
    mod_inbox_rdbms:get_inbox_unread/4 function always adds 1 to the result
    
    The order can't be easily swapped because of the possibility of having
    asynchronous workers for inbox.
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    98bd032 View commit details
    Browse the repository at this point in the history
  2. Use host types in push-notification hooks

    - 'push_notifications' still needs the HostType separately
      because the Acc can be just 'ok'
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    abc607d View commit details
    Browse the repository at this point in the history
  3. Update hook calls in ejabberd_c2s

    Drop the host type where it can be obtained from the acc
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    8688506 View commit details
    Browse the repository at this point in the history
  4. Update event_pusher hook handlers - drop the server

    Host type is now obtained from the acc.
    
    Also: don't use the config of the sender's domain (which can be hosted
    by a different server) to figure out if the recipient's message
    triggers a push notification
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    a3265fe View commit details
    Browse the repository at this point in the history
  5. Use host types and maps for opts in mod_event_pusher

    - Drop the 'backend' subsection, which provided no extra value
    - Do not store backends in ets, the config is enough
    - Order backends alphabetically
    - Simplify config_metrics logic
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    731c945 View commit details
    Browse the repository at this point in the history
  6. Fix and update mod_event_pusher_http

    - Use maps for opts
    - Add a new option with a list of handlers - previously it was
      impossible to set up multiple handlers, which was against the docs.
    - Process the path prefix on parsing (only once)
    - Use host types
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    da150de View commit details
    Browse the repository at this point in the history
  7. Update mod_event_pusher_push

    - Use maps for opts
    - Use host types
    - Use the wpool defaults from mongoose_config_spec
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    528dca3 View commit details
    Browse the repository at this point in the history
  8. Update mod_event_pusher_push backends

    Use host types, update specs for module opts
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    337bea6 View commit details
    Browse the repository at this point in the history
  9. Update mod_event_pusher_push plugin

    - Use host types and module opts in a map
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    f8ea083 View commit details
    Browse the repository at this point in the history
  10. Update mod_event_pusher_rabbit

    - Use maps for opts
    - Add a type for exchange opts
    - Make the code more straightforward
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    078b6be View commit details
    Browse the repository at this point in the history
  11. Update mod_event_pusher_sns

    - Use maps for opts
    - Use host types
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    ff44479 View commit details
    Browse the repository at this point in the history
  12. Update config parser tests for event_pusher

    - Use maps and defaults
    - Use a separate helper for the HTTP handlers, because it is an item in
      a list, and thus it doesn't have a path
    - Test wpool in a generic way, in the future we can rework other wpool
      tests to do the same
    - Check multiple handlers for HTTP
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    eebd847 View commit details
    Browse the repository at this point in the history
  13. Update event_pusher_sns tests to use maps for opts

    - Do not test changing config on the fly, this is not supported
    - Start the full module
    - Host type is the same as domain, but in the future we can change this
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    1bbc2c1 View commit details
    Browse the repository at this point in the history
  14. Update mod_event_pusher_http_SUITE

    - Configure event_pusher with maps
    - Path should be binary without the leading '/'
    - Remove obsolete options that had no effect
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    f2632ed View commit details
    Browse the repository at this point in the history
  15. Update mod_event_pusher_rabbit_SUITE

    - Use opts in maps
    - Start module always in init_per_testcase
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    9a3fc88 View commit details
    Browse the repository at this point in the history
  16. Update mod_event_pusher_sns_SUITE

    - Set opts in maps
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    82b08f3 View commit details
    Browse the repository at this point in the history
  17. Update push_SUITE

    - Set opts in maps
    - Return the correct Acc in process_packet to avoid errors in logs
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    44e7b80 View commit details
    Browse the repository at this point in the history
  18. Update push_http_SUITE

    - Set opts in maps
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    5b5f83c View commit details
    Browse the repository at this point in the history
  19. Update push_integration_SUITE

    - Set opts in maps
    - Refactor code in a functional way
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    b40f3ca View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    0cab387 View commit details
    Browse the repository at this point in the history
  21. Fix and polish config metrics reported from mod_event_pusher

    The backend can be reported from mod_event_pusher_push,
    it looks cleaner this way.
    chrzaszcz committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    04cf562 View commit details
    Browse the repository at this point in the history