Bug 1250458 - Reclaim task before file uploads r=nthomas
authorRail Aliiev <rail@mozilla.com>
Sat, 09 Apr 2016 22:39:59 -0400
changeset 330417 b85e9878c32f9082f9f2321f129fa876ffe41298
parent 330416 4dd75604c9bef96547595e39371b0b3c16cef4b4
child 330418 8803d34bd9f8278b62c542e0ec5446148ce08fe7
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnthomas
bugs1250458
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1250458 - Reclaim task before file uploads r=nthomas MozReview-Commit-ID: 55Tf1kIJu96
testing/mozharness/mozharness/mozilla/taskcluster_helper.py
--- a/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
+++ b/testing/mozharness/mozharness/mozilla/taskcluster_helper.py
@@ -95,16 +95,19 @@ class Taskcluster(LogMixin):
     def expiration(self):
         return datetime.utcnow() + timedelta(weeks=52)
 
     def create_artifact(self, task, filename):
         mime_type = self.get_mime_type(os.path.splitext(filename)[1])
         content_length = os.path.getsize(filename)
         self.info("Uploading to S3: filename=%s mimetype=%s length=%s" % (
             filename, mime_type, content_length))
+        # reclaim the task to avoid "claim-expired" errors
+        self.taskcluster_queue.reclaimTask(
+            task['status']['taskId'], task['status']['runs'][-1]['runId'])
         artifact = self.taskcluster_queue.createArtifact(
             task['status']['taskId'],
             task['status']['runs'][-1]['runId'],
             'public/build/%s' % os.path.basename(filename),
             {
                 "storageType": "s3",
                 "expires": self.expiration,
                 "contentType": mime_type,