Closed
Bug 1329525
Opened 9 years ago
Closed 9 years ago
Workaround to prevent Gmail from threading types of changes
Categories
(Release Engineering Graveyard :: Applications: Balrog (backend), defect, P3)
Release Engineering Graveyard
Applications: Balrog (backend)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nthomas, Assigned: jaehoon217)
References
Details
(Whiteboard: [lang=python][good first bug][ready])
This might be very much in the realm of personal preference, but it irks me that gmail will group rule changes for insert/update/delete into threads for the same action. It would be more useful to show them in reverse chronological order, but it doesn't let me do that.
In the past we've set headers to start grouping mail, eg
https://dxr.mozilla.org/build-central/source/buildbotcustom/process/release.py#1761
so this is going the opposite way. Some docs here:
https://developers.google.com/gmail/api/guides/threads
Perhaps we can set a random string for In-Reply-To and/or References.
Standby to bikeshed, go!
Updated•9 years ago
|
Priority: -- → P3
Whiteboard: [lang=python][good first bug][ready]
| Assignee | ||
Comment 1•9 years ago
|
||
Hello, I want to try to do this improvement(?).
Can you talk more about this problem?
Flags: needinfo?(nthomas)
| Reporter | ||
Comment 2•9 years ago
|
||
Forwarding request to Ben Hearsum.
Flags: needinfo?(nthomas) → needinfo?(bhearsum)
Comment 3•9 years ago
|
||
(In reply to Jaehoon Hwang from comment #1)
> Hello, I want to try to do this improvement(?).
> Can you talk more about this problem?
The problem that Nick talks about can be seen on this mailing list: https://groups.google.com/a/mozilla.com/forum/#!forum/balrog-db-changes
When we make changes to certain tables, we send e-mail that notifies that list. The problem Nick describes is that even though each mail shows changes to a different Rule, Permission, etc. - many of them get grouped together. This is annoying and somewhat confusing.
The simplest solution here is ungrouping them - and Nick has some suggestions about how to do that (changing In-Reply-To per message seems like a promising approach).
Testing this is going to be a little bit painful - we disable mail notification for local dev environments. If you set the environment variables listed on https://github.com/mozilla/balrog/blob/94857372cf47bb7ea80a442aff2ea8389a9f4a7d/docker-compose.yml#L23, and then run "docker-compose up", you should get notifications when you change Rules.
Does that make sense?
Flags: needinfo?(bhearsum)
| Assignee | ||
Comment 4•9 years ago
|
||
Yes.
I do have one question: where can I find the file that is sending these mails?
Is it in https://github.com/mozilla/balrog/blob/master/auslib/db.py?
I want to make sure I'm working on the right file before I start.
| Assignee | ||
Comment 5•9 years ago
|
||
Sorry, I don't know how to edit this message, but to be more specific:
https://github.com/mozilla/balrog/blob/master/auslib/db.py#L2377
Comment 6•9 years ago
|
||
(In reply to Jaehoon Hwang from comment #5)
> Sorry, I don't know how to edit this message, but to be more specific:
> https://github.com/mozilla/balrog/blob/master/auslib/db.py#L2377
You're on the right track. "make_change_notifier" (https://github.com/mozilla/balrog/blob/94857372cf47bb7ea80a442aff2ea8389a9f4a7d/auslib/db.py#L2406) is the code involved here. There's also some tests for them at https://github.com/mozilla/balrog/blob/94857372cf47bb7ea80a442aff2ea8389a9f4a7d/auslib/test/test_db.py#L3856.
| Assignee | ||
Comment 7•9 years ago
|
||
Hello, I'm trying to send myself the mail notification using gmail.
# Grab mail information from the local environment
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_USERNAME=test.balrog.jay@gmail.com
- SMTP_PASSWORD=somepassword
- SMTP_TLS=587
- NOTIFY_TO_ADDR=test.balrog.jay@gmail.com
- NOTIFY_FROM_ADDR=test.balrog.jay@gmail.com
I'm getting unexpected disconnection error.
Can you help me?
Comment 8•9 years ago
|
||
(In reply to Jaehoon Hwang from comment #7)
> Hello, I'm trying to send myself the mail notification using gmail.
>
> # Grab mail information from the local environment
> - SMTP_HOST=smtp.gmail.com
> - SMTP_PORT=465
> - SMTP_USERNAME=test.balrog.jay@gmail.com
> - SMTP_PASSWORD=somepassword
> - SMTP_TLS=587
> - NOTIFY_TO_ADDR=test.balrog.jay@gmail.com
> - NOTIFY_FROM_ADDR=test.balrog.jay@gmail.com
>
> I'm getting unexpected disconnection error.
> Can you help me?
This is probably due to setting SMTP_TLS. It's actually supposed to be a boolean that enables or disables TLS. IIRC, you want to disable it for smtp.gmail.com, so try not setting it at all.
Comment 9•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/balrog
https://github.com/mozilla/balrog/commit/5d2d3438f1f8c4d1f4577f4ec4158292608f534a
Bug 1329525: Ungrouping of emails (#256). r=bhearsum
Updated•9 years ago
|
Assignee: nobody → jaehoon217
Comment 10•9 years ago
|
||
Very nice work on this Jaehoon, this is now in production! Let me know if you'd like help finding another bug to work on.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Release Engineering → Release Engineering Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•