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)

defect

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!
Priority: -- → P3
Whiteboard: [lang=python][good first bug][ready]
Hello, I want to try to do this improvement(?). Can you talk more about this problem?
Flags: needinfo?(nthomas)
Forwarding request to Ben Hearsum.
Flags: needinfo?(nthomas) → needinfo?(bhearsum)
(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)
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.
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
(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.
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?
(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.
Assignee: nobody → jaehoon217
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
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.