diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /doc/development/emails.md | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'doc/development/emails.md')
-rw-r--r-- | doc/development/emails.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/development/emails.md b/doc/development/emails.md index e6e2ea8aae7..2477a51f78f 100644 --- a/doc/development/emails.md +++ b/doc/development/emails.md @@ -1,5 +1,20 @@ # Dealing with email in development +## Ensuring compatibility with mailer Sidekiq jobs + +A Sidekiq job is enqueued whenever `deliver_later` is called on an `ActionMailer`. +If a mailer argument needs to be added or removed, it is important to ensure +both backward and forward compatibility. Adhere to the Sidekiq Style Guide steps for +[changing the arguments for a worker](sidekiq_style_guide.md#changing-the-arguments-for-a-worker). + +In the following example from [`NotificationService`](https://gitlab.com/gitlab-org/gitlab/-/blob/33ccb22e4fc271dbaac94b003a7a1a2915a13441/app/services/notification_service.rb#L74) +adding or removing an argument in this mailer's definition may cause problems +during deployment before all Rails and Sidekiq nodes have the updated code. + +```ruby +mailer.unknown_sign_in_email(user, ip, time).deliver_later +``` + ## Sent emails To view rendered emails "sent" in your development instance, visit |