Skip to content

Service Desk Verification: Send verification mail asynchronously

Problem

In !120758 (merged) we've added ServiceDesk::CustomEmailVerifications::CreateService which sends the verification email synchronously. This feature is behind a feature flag (#329990 (closed)).

According to https://docs.gitlab.com/ee/development/reactive_caching.html#when-to-use we should avoid blocking webserver workers.

Proposed solution

Before making this feature generally available we should use reactive caching to send emails and let client poll for changes.

Discussion

The following discussion from !120758 (merged) should be addressed:

  • @splattael started a discussion: (+3 comments)

    Question (non-blocking) Since we are not using this service yet, do we make sure that this service is actually called in a background job? 🤔

    If so, should we state this fact in the class documentation 🤷

    Reason: We don't want puma workers to be blocked by waiting on external network.