Closed
Bug 717395
Opened 13 years ago
Closed 13 years ago
get rid of self.attributes for PerfConfigurator.py (etc)
Categories
(Testing :: Talos, defect)
Testing
Talos
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: k0scist, Unassigned)
References
Details
(Whiteboard: [good first bug][mentor=jhammel][lang=py])
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
k0scist
:
review+
|
Details | Diff | Splinter Review |
self.attributes is largely an overlap between the data passed in in
the form of options.__dict__.keys(). There are three things in
self.attributes that aren't in the options: 'logFile',
'masterIniSubpath', 'currentDate'. Really, this is duplication of
information. In addition, instead of expecting an options instance
and updating from its __dict__, we __init__ should take **kwargs and
**options.__dict__ passed in to the constructor.
(Pdb) options.__dict__.keys()
['rss', 'verbose', 'test_timeout', 'configPath', 'extraPrefs',
'browserWait', 'noShutdown', 'outputName', 'responsiveness',
'develop', 'title', 'symbolsPath', 'webServer', 'fast', 'testPrefix',
'sampleConfig', 'xperf_path', 'branch', 'useId', 'buildid',
'mozAfterPaint', 'addonID', 'testDate', 'exePath', 'resultsURL',
'logFile', 'extension', 'activeTests', 'noChrome', 'branchName']
(Pdb) self.attributes
['exePath', 'configPath', 'sampleConfig', 'outputName', 'title',
'branch', 'branchName', 'buildid', 'currentDate', 'browserWait',
'verbose', 'testDate', 'useId', 'resultsURL', 'activeTests',
'noChrome', 'fast', 'testPrefix', 'extension', 'masterIniSubpath',
'test_timeout', 'symbolsPath', 'addonID', 'noShutdown', 'extraPrefs',
'xperf_path', 'mozAfterPaint', 'webServer', 'develop',
'responsiveness', 'rss']
(Pdb) set(self.attributes) == set(options.__dict__.keys())
False
(Pdb) attributes = set(self.attributes)
(Pdb) keys = set(options.__dict__.keys())
(Pdb) attributes.symmetric_difference(keys)
set(['logFile', 'masterIniSubpath', 'currentDate'])
Reporter | ||
Comment 1•13 years ago
|
||
It is worth noting that these attributes are used in only one place!:
talos)│grep -n 'attributes' *.py
PerfConfigurator.py:32: attributes = ['browser_path', 'configPath', 'sampleConfig', 'outputName', 'title',
PerfConfigurator.py:47: for i in self.attributes:
remotePerfConfigurator.py:20: pc.PerfConfigurator.attributes += ['deviceip', 'deviceport', 'deviceroot', 'nativeUI']
Reporter | ||
Comment 2•13 years ago
|
||
This kills a lot of redundant information. In a sense, the code is more brittle since it depends on the options being passed in being correct. In the longer term, the configuration classes (e.g. PerfConfigurator, remotePerfConfigurator) should generate the parser and options from their configuration.
Attachment #595233 -
Flags: review?(jmaher)
Reporter | ||
Comment 3•13 years ago
|
||
> In the longer term, the configuration classes (e.g. PerfConfigurator, remotePerfConfigurator) should generate the parser and options from their configuration.
see bug 725140
Reporter | ||
Comment 4•13 years ago
|
||
Attachment #595233 -
Attachment is obsolete: true
Attachment #595233 -
Flags: review?(jmaher)
Attachment #595246 -
Flags: review?(jmaher)
Comment 5•13 years ago
|
||
Comment on attachment 595246 [details] [diff] [review]
fix a typo and unbitrot
Review of attachment 595246 [details] [diff] [review]:
-----------------------------------------------------------------
nice!
Attachment #595246 -
Flags: review?(jmaher) → review+
Reporter | ||
Comment 6•13 years ago
|
||
carrying r+ forward
Attachment #595246 -
Attachment is obsolete: true
Attachment #595546 -
Flags: review+
Reporter | ||
Comment 7•13 years ago
|
||
tested on android with ts and tsvg
Reporter | ||
Comment 8•13 years ago
|
||
Trying: https://tbpl.mozilla.org/?tree=Try&rev=3a52c72ec753
So there are a lot of errors. However, they don't particularly seem related to this patch. Should I retry or push?
Comment 9•13 years ago
|
||
Try run for 3a52c72ec753 is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=3a52c72ec753
Results (out of 73 total builds):
success: 69
failure: 4
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jhammel@mozilla.com-3a52c72ec753
Reporter | ||
Comment 10•13 years ago
|
||
pushed: http://hg.mozilla.org/build/talos/rev/953512de9269
The failures on try seem mostly related to a broken m-c that the patch was pushed along with and the others don't seem to have anything to do with this patch (autolog broken, etc)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•