Closed Bug 1170281 Opened 9 years ago Closed 8 years ago

cleanup talos output.py file

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(firefox41 affected, firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox41 --- affected
firefox50 --- fixed

People

(Reporter: jmaher, Assigned: malayaleecoder)

References

Details

(Whiteboard: [talos_wishlist])

Attachments

(1 file, 5 obsolete files)

talos has gone through a lot of changes over the years.

For this bug, I do not have clear direction.  Previously we had two upload classes:
GraphServerOutput
DatazillaOutput

We removed DatazillaOutput, and replaced it with PerfherderOutput!

In the near future (later this summer), we won't be uploading to graph server.  I believe we could cleanup output.py in preparation of that.  Some thoughts:
* we have a base class and methods defined to support graphserver + datazilla
* perfherderoutput has what it needs- ideally it could be simplified a bit
* we could reduce graphserver output code to not be so generic and add some hacks/scaffolding around it
* maybe move graphserver output and related code to a different file (post_file.py, graph_server.py?) and keep output.py simplified.
* reduce the needs of data structures to hold data

I am open to anything!
The graph server url (results_urls) option should be removed then (eventually hardcoded if we start to adress this bug before we drop the support to graph server). See bug 1172918 comment 6.
We have now removed graphserver support from Talos!  This bug can be more actionable now.
Blocks: 1088251
Whiteboard: [talos_wishlist]
Assignee: nobody → malayaleecoder
Attached patch Bug1170281_v1.diff (obsolete) — Splinter Review
Attachment #8758804 - Flags: feedback?(jmaher)
Status: NEW → ASSIGNED
Comment on attachment 8758804 [details] [diff] [review]
Bug1170281_v1.diff

Review of attachment 8758804 [details] [diff] [review]:
-----------------------------------------------------------------

a few things I noticed- lets fix those and post a new patch.

::: testing/talos/talos/output.py
@@ -282,5 @@
>                                 'subtests': counter_subtests})
>          return test_results
>  
> -# available output formats
> -formats = {'output_urls': PerfherderOutput}

have you looked in results.py for where we use formats?

@@ +186,5 @@
> +            json.dump(results, file(results_path, 'w'), indent=2,
> +                      sort_keys=True)
> +
> +    def post(self, results, server, path, scheme, tbpl_output):
> +        raise NotImplementedError("Abstract base class")

we should have post defined, this isn't an abstract base class anymore
Attachment #8758804 - Flags: feedback?(jmaher) → feedback-
Attached patch Bug1170281_v2.diff (obsolete) — Splinter Review
Have incorporated the said changes :)
Attachment #8758804 - Attachment is obsolete: true
Attachment #8758827 - Flags: feedback?(jmaher)
Comment on attachment 8758827 [details] [diff] [review]
Bug1170281_v2.diff

Review of attachment 8758827 [details] [diff] [review]:
-----------------------------------------------------------------

lets give this another try!

::: testing/talos/talos/results.py
@@ -44,5 @@
>              cls = output.formats[format]
>              cls.check(urls)
>  
> -    @classmethod
> -    def check_formats_exist(cls, formats):

who calls this?  we should ensure when we remove code that nobody is depending on it...I suspect there is a handful of other lines to remove from here.
Attachment #8758827 - Flags: feedback?(jmaher) → feedback-
Attached patch Bug1170281_v3.diff (obsolete) — Splinter Review
Thanks for that :)
Attachment #8758827 - Attachment is obsolete: true
Attachment #8758872 - Flags: feedback?(jmaher)
Comment on attachment 8758872 [details] [diff] [review]
Bug1170281_v3.diff

Review of attachment 8758872 [details] [diff] [review]:
-----------------------------------------------------------------

hey, this is looking better.  Please run on try |try -b o -p linux64,win32 -u none -t all| after verifying things work ok with a simple local test.
Attachment #8758872 - Flags: feedback?(jmaher) → feedback+
Attached patch Bug1170281_v4.diff (obsolete) — Splinter Review
A successful try push for the same can be found here,

https://treeherder.mozilla.org/#/jobs?repo=try&revision=14e04e84d4b7
Attachment #8758872 - Attachment is obsolete: true
Attachment #8759989 - Flags: review?(jmaher)
Comment on attachment 8759989 [details] [diff] [review]
Bug1170281_v4.diff

Review of attachment 8759989 [details] [diff] [review]:
-----------------------------------------------------------------

one thing I would like to verify before calling this done.  Please verify a local file is produced with the current patch, if not, then add the for loop back in.

::: testing/talos/talos/results.py
@@ +39,5 @@
>          try:
> +            url = output_formats.items()
> +            _output = output.Output(self)
> +            results = _output()
> +            _output.output(results, url, tbpl_output)

do we need the for loop?  I believe it is needed to output the perfherder json as well as a file output.  this can be tested with |mach talos-test -a svgx --output myfile.json|, then verify if myfile.json exists.
Attachment #8759989 - Flags: review?(jmaher) → review-
Attached patch Bug1170281_v5.diff (obsolete) — Splinter Review
With the current patch local.json is being created. Please have a look.
Attachment #8759989 - Attachment is obsolete: true
Attachment #8763996 - Flags: review?(jmaher)
Comment on attachment 8763996 [details] [diff] [review]
Bug1170281_v5.diff

Review of attachment 8763996 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for fixing this up!
Attachment #8763996 - Flags: review?(jmaher) → review+
Keywords: checkin-needed
has problems to apply:

renamed 1170281 -> Bug1170281_v7.diff
applying Bug1170281_v7.diff
patching file testing/talos/talos/output.py
Hunk #2 FAILED at 39
1 out of 3 hunks FAILED -- saving rejects to file testing/talos/talos/output.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh Bug1170281_v7.diff
Flags: needinfo?(malayaleecoder)
Keywords: checkin-needed
I have done the rebasing, please have a look :)
Attachment #8763996 - Attachment is obsolete: true
Flags: needinfo?(malayaleecoder)
Attachment #8764713 - Flags: review?(jmaher)
Attachment #8764713 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/f7b09506d96f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: