Bug 1297585 - Modify parameters for buildUrl to satisfy taskcluster changes. r=glandium
authorAl Tsai <atsai@mozilla.com>
Thu, 01 Sep 2016 15:02:09 +0800
changeset 354217 d392d81c5b9e4f505258d460df14b99942d3695f
parent 354216 5aabb19fcdfe384ced77636f8556d3488e37d51f
child 354218 17e78729eb385a982008497412b021a9c484f52e
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1297585
milestone51.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 1297585 - Modify parameters for buildUrl to satisfy taskcluster changes. r=glandium
python/mozbuild/mozbuild/artifacts.py
testing/docker/rust-build/tcbuild.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -633,17 +633,18 @@ class TaskCache(CacheManager):
         artifacts = self._queue.listLatestArtifacts(taskId)['artifacts']
 
         urls = []
         for artifact_name in artifact_job.find_candidate_artifacts(artifacts):
             # We can easily extract the task ID from the URL.  We can't easily
             # extract the build ID; we use the .ini files embedded in the
             # downloaded artifact for this.  We could also use the uploaded
             # public/build/buildprops.json for this purpose.
-            url = self._queue.buildUrl('getLatestArtifact', taskId, artifact_name)
+            replDict = {'taskId': taskId, 'name': artifact_name}
+            url = self._queue.buildUrl('getLatestArtifact', replDict=replDict)
             urls.append(url)
         if not urls:
             raise ValueError('Task for {key} existed, but no artifacts found!'.format(key=key))
         return urls
 
     def print_last_item(self, args, sorted_kwargs, result):
         tree, job, rev = args
         self.log(logging.INFO, 'artifact',
--- a/testing/docker/rust-build/tcbuild.py
+++ b/testing/docker/rust-build/tcbuild.py
@@ -96,17 +96,18 @@ def wait_for_task(queue, task_id, initia
         time.sleep(10)
 
 def fetch_artifact(queue, task_id, run_id, name, dest_dir):
     '''
     Fetch the artifact with name from task_id and run_id in queue,
     write it to a file in dest_dir, and return the path to the written
     file.
     '''
-    url = queue.buildUrl('getArtifact', task_id, run_id, name)
+    replDict = {'taskId': task_id, 'runId': run_id, 'name': name}
+    url = queue.buildUrl('getArtifact', replDict=replDict)
     fn = os.path.join(dest_dir, os.path.basename(name))
     print('Fetching %s...' % name)
     try:
         r = requests.get(url, stream=True)
         r.raise_for_status()
         with open(fn, 'wb') as f:
             for chunk in r.iter_content(1024):
                 f.write(chunk)