Closed Bug 1062579 Opened 7 years ago Closed 7 years ago

get_symbol() can return an empty job symbol for mochitests with no part number


(Tree Management :: Treeherder, defect, P3)



(Not tracked)



(Reporter: emorley, Assigned: emorley)



(1 file)

The fix for bug 1061758 had to wait until the fix for bug 1046743 landed, since get_symbol() doesn't protect against returning an empty symbol in certain cases.

Now that bug 1046743 has landed, we don't have to hardcode the name of each job type that has multiple parts (eg jobfoo-1, jobfoo-2), so as long as the naming convention isn't changed, we're less likely to hit this case. 

However, we may still hit it if a new mochitest job were to be added on a say a new platform, that doesn't have multiple parts.

eg: Android 9.0 mozilla-central opt test mochitest"

Since this would get identified as a mochitest, it hits:

    # Mochitests, Mochitest-e10s and Mochitest OOP are the only ones
    # that display as just a number (with no letters)
    if s in ["M", "M-e10s", "M-oop"]:
        s = ""

But with no part number we end up with no symbol:

    n = ""
    nummatch = NUMBER_RE.match(bn)
    if nummatch:
        n =
    return "{0}{1}".format(s, n)
In the case where 'n' wasn't found for jobs whose symbol letter was
suppressed (eg: a mochitest job that isn't split into multiple parts),
get_symbol() could have previously returned an empty symbol.
The suppression now only takes place if 'n' was found.
Attachment #8483806 - Flags: review?(cdawson)
Priority: -- → P3
Attachment #8483806 - Flags: review?(cdawson) → review+
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.