Closed Bug 1443667 Opened 7 years ago Closed 7 years ago

'tier' is not yet assigned when getJobGroupInfo() passes it to getGroupMapKey()

Categories

(Tree Management :: Treeherder: Frontend, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: camd)

References

Details

Attachments

(1 file)

Found whilst working on ESLint var -> let/const conversion. There appears to be a pre-existing bug here: https://github.com/mozilla/treeherder/blob/c403895cafe30fc9f59b22404cf8ad1da5924c16/ui/js/models/resultsets_store.js#L913-L921 ...in that at the time `getGroupMapKey()` is called, `tier` has been defined (due to hoisting of `var`) but not yet assigned, since that doesn't happen until the conditional. It seems like the `mapKey` definition should be moved down to just before the return? (Or else if the tier isn't important for the mapKey, then we should remove that argument from `getGroupMapKey()` entirely) Thoughts?
Flags: needinfo?(cdawson)
I'll take a look tomorrow. Nice sleuthing! :)
Flags: needinfo?(cdawson)
Attachment #8956945 - Flags: review?(emorley)
Attachment #8956945 - Flags: review?(emorley)
Attachment #8956945 - Flags: review?(emorley)
Attachment #8956945 - Flags: review?(emorley) → review+
Assignee: nobody → cdawson
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/6e2242b2c542d9931bd919574aed84efa95a5eb0 Bug 1443667 - Fix 'tier' not yet assigned when getJobGroupInfo() creates map https://github.com/mozilla/treeherder/commit/08e1d30877c9d6a110d9d67980c1c38df1864150 Bug 1443667 - Dead code removal: grpMap This object is no longer used since we stopped usign clonejobs.js
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 1458922
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: