Bug 1255250 - Stop using buildbot.* indexes in release-runner r=jlund FENNEC_47_0b6_BUILD1 FENNEC_47_0b6_RELEASE
authorRail Aliiev <rail@mozilla.com>
Sun, 15 May 2016 20:43:55 -0400
changeset 6791 186a28cf74857d96c401825a330834604e4d7443
parent 6790 252a776d2f829e1ff64a5109b1173b691ba15f8c
child 6792 be6d036cad9f09f3a85dfefd9421955cfe4b35a7
push id5069
push userraliiev@mozilla.com
push dateMon, 16 May 2016 12:53:19 +0000
reviewersjlund
bugs1255250
Bug 1255250 - Stop using buildbot.* indexes in release-runner r=jlund MozReview-Commit-ID: 9EJ61cr8e
buildfarm/release/release-runner.py
lib/python/kickoff/__init__.py
--- a/buildfarm/release/release-runner.py
+++ b/buildfarm/release/release-runner.py
@@ -391,21 +391,26 @@ def main(options):
                 "revision": release["mozillaRevision"],
                 "product": release["product"],
                 # if mozharness_revision is not passed, use 'revision'
                 "mozharness_changeset": release.get('mh_changeset') or release['mozillaRevision'],
                 "partial_updates": get_partials(rr, release['partials'], release['product']),
                 "branch": branch,
                 "updates_enabled": bool(release["partials"]),
                 "l10n_config": get_l10n_config(
-                    release['mozillaRevision'], branchConfig['platforms'],
-                    branchConfig['l10n_release_platforms'], branch, l10n_changesets, index
+                    index=index, product=release["product"], branch=branch,
+                    revision=release['mozillaRevision'],
+                    platforms=branchConfig['platforms'],
+                    l10n_platforms=branchConfig['l10n_release_platforms'],
+                    l10n_changesets=l10n_changesets
                 ),
                 "en_US_config": get_en_US_config(
-                    release['mozillaRevision'], branchConfig['release_platforms'], branch, index
+                    index=index, product=release["product"], branch=branch,
+                    revision=release['mozillaRevision'],
+                    platforms=branchConfig['release_platforms']
                 ),
                 "verifyConfigs": {},
                 "balrog_api_root": branchConfig["balrog_api_root"],
                 "funsize_balrog_api_root": branchConfig["funsize_balrog_api_root"],
                 "balrog_username": balrog_username,
                 "balrog_password": balrog_password,
                 "beetmover_aws_access_key_id": beetmover_aws_access_key_id,
                 "beetmover_aws_secret_access_key": beetmover_aws_secret_access_key,
--- a/lib/python/kickoff/__init__.py
+++ b/lib/python/kickoff/__init__.py
@@ -152,49 +152,48 @@ def get_platform_locales(l10n_changesets
     if platform == "macosx64":
         ignore = "ja"
     else:
         ignore = "ja-JP-mac"
 
     return [l for l in l10n_changesets.keys() if l != ignore]
 
 
-def get_l10n_config(mozilla_revision, platforms, l10n_platforms, branch, l10n_changesets, index):
+def task_for_revision(index, branch, revision, product, platform):
+    return index.findTask(
+        "gecko.v2.{branch}.revision.{rev}.{product}.{platform}-opt".format(
+        rev=revision, branch=branch, product=product, platform=platform))
+
+
+def get_l10n_config(index, product, branch, revision, platforms,
+                    l10n_platforms, l10n_changesets):
     l10n_platform_configs = {}
     for platform in l10n_platforms:
-        task = index.findTask("buildbot.revisions.{revision}.{branch}.{platform}".format(
-            revision=mozilla_revision,
-            branch=branch,
-            platform=platform,
-        ))
+        task = task_for_revision(index, branch, revision, product, platform)
         url = "https://queue.taskcluster.net/v1/task/{taskid}/artifacts/public/build".format(
             taskid=task["taskId"]
         )
         l10n_platform_configs[platform] = {
             "locales": get_platform_locales(l10n_changesets, platform),
             "en_us_binary_url": url,
             "chunks": platforms[platform].get("l10n_chunks", 10),
         }
 
     return {
         "platforms": l10n_platform_configs,
         "changesets": l10n_changesets,
     }
 
 
-def get_en_US_config(mozilla_revision, platforms, branch, index):
+def get_en_US_config(index, product, branch, revision, platforms):
     platform_configs = {}
     for platform in platforms:
-        task = index.findTask("buildbot.revisions.{revision}.{branch}.{platform}".format(
-            revision=mozilla_revision,
-            branch=branch,
-            platform=platform,
-        ))
+        task = task_for_revision(index, branch, revision, product, platform)
         platform_configs[platform] = {
-            "task_id": task["taskId"],
+            "task_id": task["taskId"]
         }
 
     return {
         "platforms": platform_configs,
     }
 
 
 # FIXME: the following function should be removed and we should use