Bug 49195 - webkit-patch failure-reason explodes if a build is missing
Summary: webkit-patch failure-reason explodes if a build is missing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-08 11:28 PST by Eric Seidel (no email)
Modified: 2010-11-08 14:19 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.52 KB, patch)
2010-11-08 11:29 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Add a comment explaining why it might return None (2.92 KB, patch)
2010-11-08 13:56 PST, Eric Seidel (no email)
abarth: review+
abarth: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-11-08 11:28:36 PST
webkit-patch failure-reason explodes if a build is missing
Comment 1 Eric Seidel (no email) 2010-11-08 11:29:27 PST
Created attachment 73257 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-11-08 11:30:47 PST
Comment on attachment 73257 [details]
Patch

Looks fine to me but I don't feel qualified to r+ it.
Comment 3 Eric Seidel (no email) 2010-11-08 11:32:51 PST
This is what the explosion looks like:


Traceback (most recent call last):
 File "/Projects/WebKit/WebKitTools/Scripts/webkit-patch", line 70, in <module>
   main()
 File "/Projects/WebKit/WebKitTools/Scripts/webkit-patch", line 65, in main
   WebKitPatch(__file__).main()
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py",
line 308, in main
   result = command.check_arguments_and_execute(options, args, self)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py",
line 117, in check_arguments_and_execute
   return self.execute(options, args, tool) or 0
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/tool/commands/queries.py",
line 287, in execute
   return self._explain_failures_for_builder(builder,
start_revision=int(start_revision))
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/tool/commands/queries.py",
line 244, in _explain_failures_for_builder
   latest_results = build.layout_test_results()
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/common/net/buildbot.py",
line 232, in layout_test_results
   self._layout_test_results =
LayoutTestResults.results_from_string(self._fetch_results_html())
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py",
line 75, in results_from_string
   parsed_results = cls._parse_results_html(string)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/common/net/layouttestresults.py",
line 62, in _parse_results_html
   tables = BeautifulSoup(page).findAll("table")
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/thirdparty/BeautifulSoup.py",
line 1499, in __init__
   BeautifulStoneSoup.__init__(self, *args, **kwargs)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/thirdparty/BeautifulSoup.py",
line 1230, in __init__
   self._feed(isHTML=isHTML)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/thirdparty/BeautifulSoup.py",
line 1245, in _feed
   smartQuotesTo=self.smartQuotesTo, isHTML=isHTML)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/thirdparty/BeautifulSoup.py",
line 1751, in __init__
   self._detectEncoding(markup, isHTML)
 File "/Projects/WebKit/WebKitTools/Scripts/webkitpy/thirdparty/BeautifulSoup.py",
line 1899, in _detectEncoding
   xml_encoding_match = re.compile(xml_encoding_re).match(xml_data)
TypeError: expected string or buffer
Comment 4 Eric Seidel (no email) 2010-11-08 13:56:08 PST
Created attachment 73276 [details]
Add a comment explaining why it might return None
Comment 5 Adam Barth 2010-11-08 14:03:14 PST
Comment on attachment 73276 [details]
Add a comment explaining why it might return None

View in context: https://bugs.webkit.org/attachment.cgi?id=73276&action=review

> WebKitTools/Scripts/webkitpy/common/net/buildbot.py:223
> +            # It seems this can return None if the url redirects and then returns 404.

Do other clients of this method need to understand that case?
Comment 6 Eric Seidel (no email) 2010-11-08 14:08:42 PST
(In reply to comment #5)
> (From update of attachment 73276 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=73276&action=review
> 
> > WebKitTools/Scripts/webkitpy/common/net/buildbot.py:223
> > +            # It seems this can return None if the url redirects and then returns 404.
> 
> Do other clients of this method need to understand that case?

They all do already.  This was the one outlier.
Comment 7 Eric Seidel (no email) 2010-11-08 14:19:51 PST
Committed r71571: <http://trac.webkit.org/changeset/71571>