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
--- 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: