autoland: add more logging around transplant (Bug 1294729). r?glob draft
authorSteven MacLeod <smacleod@mozilla.com>
Fri, 12 Aug 2016 11:51:33 -0400
changeset 9152 a70a415d1bdd7c48150395fd8fc9ec07c6d25856
parent 9151 5d0638a944a2e4185cf3ffa3593cb6c60af88762
push id1095
push usersmacleod@mozilla.com
push dateFri, 12 Aug 2016 15:53:46 +0000
reviewersglob
bugs1294729
autoland: add more logging around transplant (Bug 1294729). r?glob In order to diagnose errors with transplanting add more logging. This is a bit of a temporary fix and autoland logging should have a bit of a rework, but that will be left to a followup. This should be good enough for now. MozReview-Commit-ID: 3XlUG0Wfcc5
autoland/autoland/autoland.py
--- a/autoland/autoland/autoland.py
+++ b/autoland/autoland/autoland.py
@@ -97,32 +97,37 @@ def handle_pending_transplants(logger, d
             destination, treestatus.tree_is_open(destination))
 
         if not tree_open:
             handle_treeclosed(transplant_id, tree, rev, destination,
                               trysyntax, pingback_url)
             continue
 
         attempts = 0
-        logger.info('initiating transplant from tree: %s rev: %s '
-                    'to destination: %s' % (tree, rev, destination))
         started = datetime.datetime.now()
         while attempts < MAX_TRANSPLANT_ATTEMPTS:
+            logger.info('initiating transplant from tree: %s rev: %s '
+                        'to destination: %s, attempt %s' % (
+                            tree, rev, destination, attempts + 1))
+
             # TODO: We should break the transplant call into two steps, one
             #       to pull down the commits to transplant, and another
             #       one to rebase it and attempt to push so we don't
             #       duplicate work unnecessarily if we have to rebase more
             #       than once.
             os.environ['AUTOLAND_REQUEST_USER'] = requester
             landed, result = transplant.transplant(logger, tree,
                                                    destination, rev,
                                                    trysyntax, push_bookmark,
                                                    commit_descriptions)
             del os.environ['AUTOLAND_REQUEST_USER']
 
+            logging.info('transplant from tree: %s rev: %s attempt: %s: %s' % (
+                tree, rev, attempts + 1, result))
+
             if landed or 'abort: push creates new remote head' not in result:
                 break
 
             attempts += 1
 
         if landed:
             logger.info('transplant successful - new revision: %s' % result)
         else: