Page MenuHomePhabricator

Improve maintainability and scalability of Mail component
Open, LowPublic

Description

I noticed that the current Mail component has low scalability issues.

Other components directly hardcode access to a concrete class in Mail component, not an abstract type. This will hinder us to expanding our Mail capabilities in the future.

Based on this, we should write one or several interfaces to let other components depend on these interfaces instead of the concrete classes.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2018, 3:09 AM

Since I am working on a design-related task for the first time, it would be nice if someone came to verify the intention or provide help of this task.

Change 471313 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/core@master] Improve maintainability and scalability of Mail component

https://gerrit.wikimedia.org/r/471313

Krinkle edited projects, added TechCom; removed Design.Dec 22 2018, 6:57 AM
Krinkle added a project: Core Platform Team.
Krinkle added a subscriber: Krinkle.

When we talk about design, we usually refer to graphical design of user interfaces. In the context of code, we usually call it "architecture".

I've cc-ed the TC and CPT groups who may be interested in giving you feedback on this approach.

Krinkle moved this task from Inbox to Watching on the TechCom board.Jan 2 2019, 8:31 PM

I reviewed the patch. The approach looks good, but the refactoring should be improved to achieve better decoupling of components.

Status update: the code is looking good, but needs manual testing. There seems to be no good way to test sendmail and Pear Mail related code in a unit test.

@daniel What do we need to test? Mail content?

@RazeSoldier the fact that it actually sends mail with the correct content and headers :)

Extra points for checking for encoding/escaping issues, both in headers and content.

Ideally, testing is not done by the author of the code.

Change 471313 had a related patch set uploaded (by 星耀晨曦; owner: 星耀晨曦):
[mediawiki/core@master] Improve maintainability and scalability of Mail component

https://gerrit.wikimedia.org/r/471313

WDoranWMF triaged this task as Low priority.Tue, May 28, 1:08 PM
WDoranWMF added a subscriber: WDoranWMF.

We're waiting on progress on T215918 in order to be able to move this ticket forward.