Enter waiting status in ship-it, and improve logs and comments draft
authorJohan Lorenzo <jlorenzo@mozilla.com>
Thu, 01 Sep 2016 18:03:06 +0200
changeset 7135 668d72a787d4
parent 7134 173f17231c9d
child 7136 2c3d7aaef19c
push id119
push userjlorenzo@mozilla.com
push dateThu, 01 Sep 2016 16:03:19 +0000
Enter waiting status in ship-it, and improve logs and comments MozReview-Commit-ID: Em8czg8aIL8
--- a/buildfarm/release/build_status.py
+++ b/buildfarm/release/build_status.py
@@ -3,35 +3,36 @@ import taskcluster
 from kickoff import task_for_revision
 import logging
 log = logging.getLogger(__name__)
     'firefox': ['linux', 'linux64', 'macosx64', 'win32', 'win64'],
     'mobile': ['android-x86', 'android-api-9'],
+    # XXX: Thunderbird is not supported in ReleaseRunner
-def are_en_us_builds_complete(index, queue, release):
+def are_en_us_builds_completed(index, queue, release):
     product = release['product']
     platforms = PLATFORMS_TO_WAIT_ON[product]
-    log.debug('product %s, platforms %s', product, platforms)
+    log.debug('Product "%s" detected. Looking up platforms %s', product, platforms)
         tasks_to_watch = [
                 index, branch=release['branch'], revision=release['mozillaRevision'], product=product, platform=platform
             for platform in platforms
     except taskcluster.exceptions.TaskclusterRestFailure:
-        # Tasks not created yet
+        # At least one tasks not created yet
         return False
-    log.debug('tasks found %s', tasks_to_watch)
+    log.debug('All tasks have been found: %s', tasks_to_watch)
     return _are_all_tasks_completed(queue, tasks_to_watch)
 def _are_all_tasks_completed(queue, taskIds):
     tasks_not_done_yet = [taskId for taskId in taskIds if queue.status(taskId)['state'] != 'completed']
-    log.debug('tasks not done yet %s', tasks_not_done_yet)
+    log.debug('These tasks are not completed yet: %s', tasks_not_done_yet)
     return len(tasks_not_done_yet) == 0
--- a/buildfarm/release/release-runner.py
+++ b/buildfarm/release/release-runner.py
@@ -26,17 +26,17 @@ from kickoff.sanity import ReleaseSaniti
 from release.info import readBranchConfig
 from release.l10n import parsePlainL10nChangesets
 from release.versions import getAppVersion
 from taskcluster import Scheduler, Index, Queue
 from taskcluster.utils import slugId
 from util.hg import mercurial
 from util.retry import retry
 from util.file import load_config, get_config
-from build_status import are_en_us_builds_complete
+from build_status import are_en_us_builds_completed
 log = logging.getLogger(__name__)
 # both CHECKSUMS and ALL_FILES have been defined to improve the release sanity
 # en-US binaries timing by whitelisting artifacts of interest - bug 1251761
 CHECKSUMS = set([
@@ -334,22 +334,22 @@ def main(options):
         postrelease_bouncer_aliases_enabled = branchConfig['postrelease_bouncer_aliases_enabled']
         postrelease_mark_as_shipped_enabled = branchConfig['postrelease_mark_as_shipped_enabled']
         final_verify_channels = release_channels
         publish_to_balrog_channels = release_channels
         push_to_releases_enabled = True
     rc = 0
     for release in rr.new_releases:
-        if not are_en_us_builds_complete(index, queue, release):
-            log.info('Builds for release "%s" are complete done yet. Skipping this one for now')
-            # TODO: Mark as "waiting" in ship-it
+        if not are_en_us_builds_completed(index, queue, release):
+            log.info('Builds for release "%s" are not completed yet. Skipping this one for now', release)
+            rr.update_status(release, 'Waiting for builds to be completed')
-        log.info('Every build for release "%s" is complete!')
+        log.info('Every build for release "%s" is completed!', release)
         graph_id = slugId()
             rr.update_status(release, 'Generating task graph')
             l10n_changesets = parsePlainL10nChangesets(rr.get_release_l10n(release["name"]))
             kwargs = {
                 "public_key": docker_worker_key,
                 "version": release["version"],