From 57965e33f337e74fb648300d07eabe0d0d75b369 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Thu, 30 Nov 2017 10:51:30 -0500 Subject: [PATCH] Print a message when we start the Zuul console The link for the job console is made available before Ansible starts printing things. If the console is empty, users will be greeted with an "END OF STREAM" message and will need to keep refreshing until there is actual content. Writing a minimal message to "start" the console will prevent that. Change-Id: I4200c91b468b1c2fcccee23dda19962b30335ef5 --- zuul/executor/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zuul/executor/server.py b/zuul/executor/server.py index 791652f373..1f069f0f30 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -358,8 +358,10 @@ class JobDir(object): # there is a period of time where the user can click on the live log # link on the status page but the log streaming fails because the file # is not there yet. - with open(self.job_output_file, 'w'): - pass + with open(self.job_output_file, 'w') as job_output: + job_output.write("{now} | Job console starting...\n".format( + now=datetime.datetime.now() + )) self.trusted_projects = [] self.trusted_project_index = {}