Skip to content

Avoid autoload issue such as 'Mail::Parsers::AddressStruct'

What does this MR do?

It eager-loads the Mail gem when we're in a Sidekiq context.

Are there points in the code the reviewer needs to double check?

This is mostly a shot in the dark but at least it shouldn't break anything.

Why was this MR needed?

Because of #18810 (closed).

What are the relevant issue numbers?

Fixes #18810 (closed).

Does this MR meet the acceptance criteria?

  • No CHANGELOG since it's an intermittent issue (it depends on the loading order so the job usually succeeds on subsequent retries)
  • Tests
    • All builds are passing
  • Conform by the style guides
  • Branch has no merge conflicts with master (if you do - rebase it please)
  • Squashed related commits together

Merge request reports