bug 1431799 - rr3: add `version`; use rc relpro flavor; stop using desktop_release_type r=mtabara
authorAki Sasaki <asasaki@mozilla.com>
Fri, 26 Jan 2018 14:33:50 -0800
changeset 8528 d867e7cc12e416b8fdcd7f00cf638b604d3937ce
parent 8527 99b39094a9368707e8f6c0cb8965d49a957136f5
child 8529 ea0c2bf92242f63715d6e391117b7c721ebf1645
push id279
push userasasaki@mozilla.com
push dateTue, 06 Feb 2018 18:39:34 +0000
reviewersmtabara
bugs1431799
bug 1431799 - rr3: add `version`; use rc relpro flavor; stop using desktop_release_type r=mtabara MozReview-Commit-ID: 6PuclXHQdeI
buildfarm/release/release-runner3.py
--- a/buildfarm/release/release-runner3.py
+++ b/buildfarm/release/release-runner3.py
@@ -171,45 +171,52 @@ def main(options):
                 time.sleep(sleeptime)
         except:
             log.error("Caught exception when polling:", exc_info=True)
             sys.exit(5)
 
     rc = 0
     for release in new_releases:
         try:
-            next_version = bump_version(release["version"].replace("esr", ""))
+            version = release["version"]
+            # XXX we may want to move next_version logic to the release_promotion action.
+            next_version = bump_version(version.replace("esr", ""))
             project = release["branchShortName"]
             revision = release["mozillaRevision"]
+            # XXX we probably want to find a decision task ID for the action, and a separate
+            # one for the revision-to-promote, to allow for https://trello.com/c/u6MHrz8y .
             decision_task_id = find_decision_task_id(project, revision)
             action_task_input = {
                 "build_number": release["buildNumber"],
                 "next_version": next_version,
+                # specify version rather than relying on in-tree version,
+                # so if a version bump happens between the build and an action task
+                # revision, we still use the correct version.
+                "version": version,
                 "release_promotion_flavor": "promote_{}".format(release["product"]),
                 "previous_graph_ids": [decision_task_id],
                 "release_eta": release.get("release_eta"),
             }
             if "partial_updates" in release:
                 action_task_input["partial_updates"] = {}
-                for version, info in release["partial_updates"].items():
-                    action_task_input["partial_updates"][version] = {
+                for partial_version, info in release["partial_updates"].items():
+                    action_task_input["partial_updates"][partial_version] = {
                         "buildNumber": info["buildNumber"],
                         "locales": info["locales"]
                     }
             if release["product"] == "firefox":
-                if is_beta(release["version"]):
-                    action_task_input["desktop_release_type"] = "beta"
-                elif is_esr(release["version"]):
-                    action_task_input["desktop_release_type"] = "esr"
-                elif is_rc(release):
-                    action_task_input["desktop_release_type"] = "rc"
-                else:
-                    action_task_input["desktop_release_type"] = "release"
-            elif release["product"] == "devedition":
-                action_task_input["desktop_release_type"] = "devedition"
+                if is_rc(release):
+                    # XXX The current plan is to run promote_firefox_rc, then
+                    # ship_firefox_rc, then push_firefox, then ship_firefox.
+                    # We need to support this workflow. However, rr3 doesn't
+                    # support anything more than the first action task yet,
+                    # so this isn't a missing feature for RCs specifically.
+                    action_task_input["release_promotion_flavor"] = "{}_rc".format(
+                        action_task_input["release_promotion_flavor"]
+                    )
             action_task_id, action_task = generate_action_task(
                 project=release["branchShortName"],
                 revision=release["mozillaRevision"],
                 action_task_input=action_task_input,
             )
             submit_action_task(queue=queue, action_task_id=action_task_id,
                                action_task=action_task)
             rr.mark_as_completed(release)