Closed Bug 1352809 Opened 7 years ago Closed 7 years ago

Try submission e-mail subject lines do not contain bug number/summary when truncated

Categories

(Release Engineering :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ayg, Assigned: ayg)

References

Details

Attachments

(1 file)

(I don't think Treeherder actually sends these e-mails, but I don't know what does, so please feel free to recategorize this.)

The subject line you get for a try push e-mail looks like this:

  try submission 4b1ebb3fda263851ba0ca804f8ea6bb72a09f6f9: Bug 1297414 - Change default paragraph separator to <div>

In my inbox (Gmail) this looks like:

  try submission 4b1ebb3fda263851ba0ca804f8ea6bb72a09

When I have multiple such e-mails, I have no way of knowing which one is which.  Could we perhaps abbreviate the hash to, say, seven characters, so it looks like:

  try submission 4b1ebb3: Bug 1297414 - Change defaul
Emails are sent at two points...

1) Immediately after submission:
https://hg.mozilla.org/build/buildbotcustom/file/default/status/generators.py

2) In response to jobs completing (if people have enabled this; off by default):
https://hg.mozilla.org/build/buildbotcustom/file/default/bin/try_mailer.py

Both of these are owned by Release Engineering, so I'll move there :-)
Component: Treeherder → General Automation
Product: Tree Management → Release Engineering
QA Contact: catlee
This works fine for me - I see the full subject in gmail. Is this still a problem for you?
Priority: -- → P3
How wide is your window?  If it's wide enough, you'll see the bug number after the hash.  If it's not so wide, you'll see the behavior described in comment #0.  I use a monitor that's 1920 pixels wide, but with my browser only taking up half the width.

I don't have any recent try e-mails, so I can't check right now if this has changed in the last few months, but it should be easy to test by just looking at the subject of a try e-mail and seeing if it has the full hash before the bug number (as in comment #0).  If it does, it's still an issue.
Flags: needinfo?(catlee)
I'm willing to write a patch if someone can point me to where the code is . . .
I think it's implemented here:
https://hg.mozilla.org/build/buildbotcustom/file/tip/status/generators.py#l10
Flags: needinfo?(catlee)
Comment on attachment 8897388 [details]
Bug 1352809 - Use shorter revision id for e-mail subject;

https://reviewboard.mozilla.org/r/168702/#review173970

::: status/generators.py:11
(Diff revision 1)
> +    short_revision = revision[:7]
>      who = change.who
>      tree = change.branch
>      packageDir = packageDir % locals()
>      msgdict = {"type": "plain"}
> -    msgdict['subject'] = "%(tree)s submission %(revision)s" % locals()
> +    msgdict['subject'] = "%(tree)s submission %(short_revision)s" % locals()

Note that I did not test this change at all, because I don't know how I'm supposed to.  _Hopefully_ it's simple enough to work.  :)
Comment on attachment 8897388 [details]
Bug 1352809 - Use shorter revision id for e-mail subject;

https://reviewboard.mozilla.org/r/168702/#review174072

::: status/generators.py:6
(Diff revision 1)
>  import re
>  
>  
>  def buildTryChangeMessage(change, packageDir):
>      got_revision = revision = change.revision
> +    short_revision = revision[:7]

7 is a bit of an odd number to pick.

The usual length of short revisions in hg is 12. Is that too long here?
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Comment on attachment 8897388 [details]
Bug 1352809 - Use shorter revision id for e-mail subject;

https://reviewboard.mozilla.org/r/168702/#review174078

::: status/generators.py:6
(Diff revision 1)
>  import re
>  
>  
>  def buildTryChangeMessage(change, packageDir):
>      got_revision = revision = change.revision
> +    short_revision = revision[:7]

I picked 7 because that seems to be git's default.  7 gives us 28 bits, and according to the birthday paradox, I think you'd need on the order of 2^14 ~= 16,000 revisions to get a 50% chance of a collision.  We have more revisions than that, but any given person's inbox is going to have a lot fewer than 16,000 submission e-mails in it at once.  Also, the sky won't really fall if someone does get a duplicate.  So it seems like a reasonable length.

12 would also be much better than the status quo, but the shorter the better for my purposes, in order to expose more of the bug description.
Comment on attachment 8897388 [details]
Bug 1352809 - Use shorter revision id for e-mail subject;

https://reviewboard.mozilla.org/r/168702/#review174728
Attachment #8897388 - Flags: review?(catlee) → review+
https://hg.mozilla.org/build/buildbotcustom/rev/8915fbee78ed2e931053d8409bea40a598ef52d8

Thanks!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: