Skip to content

Trigger EE EventStore event when new members are added to a group

Josianne Hyson requested to merge jh-overage_notification_field into master

What does this MR do and why?

Related to #351423 (closed)

Needed for: https://gitlab.com/gitlab-org/gitlab/-/issues/348487

We want to be able to trigger an event for EE only subscribers so that we can send the user an email when they go over their purchased seat allowance.

Add an EE version of the EventStore configuration so that we can register an EE subscriber for the MembersAdded event. The handling of this event will be addressed in a follow up MR, currently this is just a no-op.

How to set up and validate locally

Groups

  1. Create or select a group in the GitLab UI
  2. Navigate to Group Information > Members
  3. Add a user to the group
  4. Observe the GitlabSubscriptions::NotifySeatsExceededWorker has been run in log/sidekiq.log
  5. Observe there are no retries for this worker at http://localhost:3000/admin/sidekiq
  6. Observe there are no related errors in log/exceptions_json.log

Projects

  1. Create or select a project in the GitLab UI
  2. Navigate to Project Information > Members
  3. Add a user to the project
  4. Observe the GitlabSubscriptions::NotifySeatsExceededWorker has been run in log/sidekiq.log
  5. Observe there are no retries for this worker at http://localhost:3000/admin/sidekiq
  6. Observe there are no related errors in log/exceptions_json.log

Restart GDK in FOSS_ONLY mode, and repeat the above steps - ensuring that the job is not triggered in this case.

FOSS_ONLY=1 gdk restart

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Josianne Hyson

Merge request reports