Bug 1250458 - Reclaim task before file uploads r=nthomas
MozReview-Commit-ID: 55Tf1kIJu96
--- 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,