Skip to content
This repository has been archived by the owner on Oct 3, 2018. It is now read-only.

Commit

Permalink
Submit jobs to Treeherder using revision not revision hash
Browse files Browse the repository at this point in the history
Since the client no longer accepts revision_hash after bug 1199364.
  • Loading branch information
Ed Morley committed Jul 20, 2016
1 parent de5f75c commit 531a54b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions util/process_perf_data.py
Expand Up @@ -43,13 +43,6 @@
]


class RevisionNotFoundError(Exception):
"""
Indicates the given revision was not found in the given repo.
"""
pass


# Based on autophone implementation
class S3:
def __init__(self, bucket_name, access_key_id, access_secret_key):
Expand Down Expand Up @@ -209,14 +202,9 @@ def create_treeherder_job(repo, revision, client, nodes, s3=None):
:param nodes: The dataset for this build.
:param s3: Optional Amazon S3 bucket to upload logs to.
"""
try:
rev_hash = client.get_resultsets(repo, revision=revision)[0]['revision_hash']
except IndexError:
raise RevisionNotFoundError("Revision %s was not found in %s" % (revision, repo))

tj = TreeherderJob()
tj.add_tier(2)
tj.add_revision_hash(rev_hash)
tj.add_revision(revision)
tj.add_project(repo)

tj.add_job_name('awsy 1')
Expand Down Expand Up @@ -299,10 +287,6 @@ def post_treeherder_jobs(client, revisions, s3=None):
except KeyError as e:
print "Failed to generate data for %s: %s, probably still running" % (revision, e)
continue
except RevisionNotFoundError as e:
print "%s, skipping" % e
successful.append(revision)
continue

try:
# NB: In theory we could batch these, but each collection has to be from
Expand Down

0 comments on commit 531a54b

Please sign in to comment.