Bug 1366070 - Override product name in Balrog submission. r=bhearsum a=release
authorRail Aliiev <rail@mozilla.com>
Fri, 19 May 2017 09:23:18 -0400
changeset 396376 e161af4fc095a433ca4b37c39f25406438e96aa9
parent 396375 a2d407b9da248932f50c95533d13cd8043ca2e21
child 396377 399ca5a290f50eab8d3fc5cba486b607d52f1e33
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhearsum, release
bugs1366070
milestone54.0
Bug 1366070 - Override product name in Balrog submission. r=bhearsum a=release MozReview-Commit-ID: LpsUaXI1LxD
taskcluster/docker/funsize-balrog-submitter/scripts/funsize-balrog-submitter.py
--- a/taskcluster/docker/funsize-balrog-submitter/scripts/funsize-balrog-submitter.py
+++ b/taskcluster/docker/funsize-balrog-submitter/scripts/funsize-balrog-submitter.py
@@ -111,16 +111,17 @@ def main():
     parser.add_argument("-a", "--api-root", required=True,
                         help="Balrog API root")
     parser.add_argument("-d", "--dummy", action="store_true",
                         help="Add '-dummy' suffix to branch name")
     parser.add_argument("--signing-cert", required=True)
     parser.add_argument("-v", "--verbose", action="store_const",
                         dest="loglevel", const=logging.DEBUG,
                         default=logging.INFO)
+    parser.add_argument("--product", help="Override product name from application.ini")
     args = parser.parse_args()
     logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s",
                         level=args.loglevel)
     logging.getLogger("requests").setLevel(logging.WARNING)
     logging.getLogger("boto").setLevel(logging.WARNING)
 
     balrog_username = os.environ.get("BALROG_USERNAME")
     balrog_password = os.environ.get("BALROG_PASSWORD")
@@ -151,18 +152,19 @@ def main():
         }]
 
         if "previousVersion" in e and "previousBuildNumber" in e:
             log.info("Release style balrog submission")
             partial_info[0]["previousVersion"] = e["previousVersion"]
             partial_info[0]["previousBuildNumber"] = e["previousBuildNumber"]
             submitter = ReleaseSubmitterV4(api_root=args.api_root, auth=auth,
                                            dummy=args.dummy)
+            productName = args.product or e["appName"]
             retry(lambda: submitter.run(
-                platform=e["platform"], productName=e["appName"],
+                platform=e["platform"], productName=productName,
                 version=e["toVersion"],
                 build_number=e["toBuildNumber"],
                 appVersion=e["version"], extVersion=e["version"],
                 buildID=e["to_buildid"], locale=e["locale"],
                 hashFunction='sha512',
                 partialInfo=partial_info, completeInfo=complete_info,
             ))
         elif "from_buildid" in e and uploads_enabled:
@@ -186,19 +188,20 @@ def main():
                 s3_bucket, aws_access_key_id, aws_secret_access_key,
                 partial_mar_url, partial_mar_dest, args.signing_cert)
             complete_info[0]["url"] = verify_copy_to_s3(
                 s3_bucket, aws_access_key_id, aws_secret_access_key,
                 complete_mar_url, complete_mar_dest, args.signing_cert)
             partial_info[0]["from_buildid"] = e["from_buildid"]
             submitter = NightlySubmitterV4(api_root=args.api_root, auth=auth,
                                            dummy=args.dummy)
+            productName = args.product or e["appName"]
             retry(lambda: submitter.run(
                 platform=e["platform"], buildID=e["to_buildid"],
-                productName=e["appName"], branch=e["branch"],
+                productName=productName, branch=e["branch"],
                 appVersion=e["version"], locale=e["locale"],
                 hashFunction='sha512', extVersion=e["version"],
                 partialInfo=partial_info, completeInfo=complete_info),
                 attempts=30, sleeptime=10, max_sleeptime=60,
             )
         else:
             raise RuntimeError("Cannot determine Balrog submission style")