Closed
Bug 937210
Opened 11 years ago
Closed 10 years ago
Some Talos class names are really weird
Categories
(Testing :: Talos, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wlach, Assigned: sambuddhabasu1)
Details
Attachments
(3 files)
47.24 KB,
patch
|
jmaher
:
review-
|
Details | Diff | Splinter Review |
42.82 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
47.30 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
For some reason in talos, many of the class names are not capitalized, so we have: talosError talosRegression talosCrash talosProcess This is a really strange convention and is not consistent with either PEP8 or the rest of the talos codebase. Unless I'm missing something IMO we should capitalize these class names. We could use facebook's codemod for this to make sure everything's covered: http://wrla.ch/blog/2012/06/mass-code-relicensing-with-facebooks-codemod/
Reporter | ||
Comment 1•11 years ago
|
||
Does the above make sense Joel? Or is there some rationalization behind the above naming convention that I'm unaware of?
Flags: needinfo?(jmaher)
Reporter | ||
Updated•11 years ago
|
Summary: Talos exception class names are weird → Some Talos class names are really weird
Comment 2•11 years ago
|
||
I am fine with capitalizing the names. We just need to make sure what is printed out matches the regex stuff that tbpl uses (https://hg.mozilla.org/webtools/tbpl/file/tip/php/inc/ ..) we can change tbpl, but it is more work. :edmorley, where does tbpl parse for talos errors?
Flags: needinfo?(jmaher) → needinfo?(emorley)
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #2) > I am fine with capitalizing the names. We just need to make sure what is > printed out matches the regex stuff that tbpl uses > (https://hg.mozilla.org/webtools/tbpl/file/tip/php/inc/ ..) > > we can change tbpl, but it is more work. > > :edmorley, where does tbpl parse for talos errors? A quick grep of the tbpl source tree (http://hg.mozilla.org/webtools/tbpl) does not find any reference to any of the class names mentioned above.
Comment 4•11 years ago
|
||
(In reply to Joel Maher (:jmaher) from comment #2) > :edmorley, where does tbpl parse for talos errors? https://hg.mozilla.org/webtools/tbpl/file/fb30dd66567f/php/inc/GeneralErrorFilter.php#l47 > 47 || preg_match("/^[A-Za-z]+Error:/", $line) // . . . . . . . . . . . . Python exceptions (And yeah very hacky) So won't be affected :-)
Flags: needinfo?(emorley)
Assignee | ||
Comment 5•10 years ago
|
||
I am interested in solving this bug. Please assign it to me.
Updated•10 years ago
|
Assignee: nobody → sammygamer
Comment 6•10 years ago
|
||
running command like : find /path/to/start/from/ -type f | xargs perl -pi -e 's/talosError/TalosError/g' on the talos directory as in : http://www.spiration.co.uk/post/522/in-place-replacement-from-command-line might be useful , or facebook codemod http://wrla.ch/blog/2012/06/mass-code-relicensing-with-facebooks-codemod/ as :wlach said in Descrition to be sure everything is covered
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8374915 -
Flags: review?(jmaher)
Comment 8•10 years ago
|
||
Comment on attachment 8374915 [details] [diff] [review] Talos class names were changed Review of attachment 8374915 [details] [diff] [review]: ----------------------------------------------------------------- all the xtalosError stuff is changed to xTalosError, we should either: 1) leave it alone 2) change it to XTalosError note: I only commented on lines for a specific file, there are a couple other files with xTalosError in them. ::: talos/xtalos/etlparser.py @@ +418,5 @@ > args = xtalos.options_from_config(args, config_file) > > # ensure process ID is given > if not args.get('processID'): > + raise xtalos.xTalosError("No process ID option given") we don't need to change this @@ +423,4 @@ > > # ensure path to xperf given > if not os.path.exists(args['xperf_path']): > + raise xtalos.xTalosError("ERROR: xperf_path '%s' does not exist" % args['xperf_path']) nor this.
Attachment #8374915 -
Flags: review?(jmaher) → review-
Assignee | ||
Comment 9•10 years ago
|
||
xtalosError was left as it is. The class names mentioned were changed.
Attachment #8374955 -
Flags: review?(jmaher)
Comment 10•10 years ago
|
||
Comment on attachment 8374955 [details] [diff] [review] Talos class names were changed Review of attachment 8374955 [details] [diff] [review]: ----------------------------------------------------------------- this looks good, let me test it on try server.
Attachment #8374955 -
Flags: review?(jmaher) → review+
Reporter | ||
Comment 11•10 years ago
|
||
Well, to be consistent with PEP8 and the intent of this bug, we should also change XTalosError to XTalosError
Assignee | ||
Comment 12•10 years ago
|
||
Change talosProcess.py to TalosProcess.py . Also, as mentioned by :wlach, it has been changed to XTalosError
Attachment #8375464 -
Flags: review?(jmaher)
Comment 13•10 years ago
|
||
Comment on attachment 8375464 [details] [diff] [review] Change talks class names Review of attachment 8375464 [details] [diff] [review]: ----------------------------------------------------------------- thanks, this is looking good. I am running on try to ensure this doesn't cause any random regressions
Attachment #8375464 -
Flags: review?(jmaher) → review+
Comment 14•10 years ago
|
||
https://hg.mozilla.org/build/talos/rev/a87b48746f70 this will be picked up in the next talos deployment to inbound, probably late next week.
Comment 15•10 years ago
|
||
oh, this went live in inbound this morning.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•