Commit 3ee98b19 authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[blinkpy] Get rid of LAST_CHANGE

This file does not seem to exist any more and new builds should always
have chromium_revision in their JSON results.

Bug: 811976
Change-Id: If8c9a2d1d9a2e18f5171947990bf404aedc41b67
Reviewed-on: https://chromium-review.googlesource.com/c/1371072
Commit-Queue: Robert Ma <robertma@chromium.org>
Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615679}
parent 37eb921a
...@@ -170,11 +170,7 @@ class BuildBot(object): ...@@ -170,11 +170,7 @@ class BuildBot(object):
if results_file is None: if results_file is None:
_log.debug('Got 404 response from:\n%s/%s', results_url, base_filename) _log.debug('Got 404 response from:\n%s/%s', results_url, base_filename)
return None return None
revision = NetworkTransaction(return_none_on_404=True).run( return WebTestResults.results_from_string(results_file)
lambda: self.fetch_file('%s/LAST_CHANGE' % results_url))
if revision is None:
_log.debug('Got 404 response from:\n%s/LAST_CHANGE', results_url)
return WebTestResults.results_from_string(results_file, revision)
def fetch_file(self, url): def fetch_file(self, url):
# It seems this can return None if the url redirects and then returns 404. # It seems this can return None if the url redirects and then returns 404.
......
...@@ -84,15 +84,11 @@ class WebTestResult(object): ...@@ -84,15 +84,11 @@ class WebTestResult(object):
class WebTestResults(object): class WebTestResults(object):
@classmethod @classmethod
def results_from_string(cls, string, chromium_revision=None): def results_from_string(cls, string):
"""Creates a WebTestResults object from a test result JSON string. """Creates a WebTestResults object from a test result JSON string.
Args: Args:
string: JSON string containing web test result. string: JSON string containing web test result.
chromium_revision: If given, it will override the chromium_revision
field in json, to indicate the last revision that has completed
uploading onto the storage server. chromium_revision can be a
git hash or position number.
""" """
if not string: if not string:
...@@ -103,7 +99,7 @@ class WebTestResults(object): ...@@ -103,7 +99,7 @@ class WebTestResults(object):
if not json_dict: if not json_dict:
return None return None
return cls(json_dict, chromium_revision) return cls(json_dict)
def __init__(self, parsed_json, chromium_revision=None): def __init__(self, parsed_json, chromium_revision=None):
self._results = parsed_json self._results = parsed_json
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment