h4x0rmofo has quit [Remote host closed the connection]
kkleine has joined #buildbot
RP has quit [Ping timeout: 250 seconds]
RP has joined #buildbot
kkleine has quit [Ping timeout: 250 seconds]
kkleine has joined #buildbot
kkleine has quit [Ping timeout: 276 seconds]
Cheyenne has joined #buildbot
Cheyenne has left #buildbot ["Leaving"]
jcarl43 has joined #buildbot
shurdeek has joined #buildbot
shurdeek_ has quit [Ping timeout: 260 seconds]
h4x0rmofo has joined #buildbot
tuxillo has quit [Remote host closed the connection]
tuxillo has joined #buildbot
shurdeek_ has joined #buildbot
shurdeek has quit [Ping timeout: 268 seconds]
kraiskil has joined #buildbot
kraiskil has quit [Ping timeout: 260 seconds]
kraiskil has joined #buildbot
kraiskil has quit [Ping timeout: 268 seconds]
kraiskil has joined #buildbot
johnsdea has joined #buildbot
<johnsdea>
Hi folks, does anyone know of a way to add a log file which has already been written as part of a step? I tried 'addLogFile(name, path)' + adding the logObserver, only to find out that it only watches for *updates* to the file. In this case the file is already written, we just want to add it to Buildbot.
<johnsdea>
I'm considering working around the issue by making our step 'mv <file> /tmp/<file> && mv /tmp/<file> <file>`, but it feels like there should be a better way.
aakashjain has joined #buildbot
kraiskil has quit [Ping timeout: 246 seconds]
<p12tic>
johnsdea: does logfiles argument to shell command work for you? (the underlying RemoteShellCommand supports it too)
<p12tic>
That gives you log contents back to the master
<p12tic>
You should be able to add a log observer for that
<p12tic>
addLogFile is no longer present since v3.0
<p12tic>
Joe80: The behaviour you're seeing looks like a bug, could you file a bug report on Github with more information?
<johnsdea>
We're using a bit of an older version, but setting `logfiles` is what happens under the hood when we call `addLogFile`. The documentation states: "The logfiles= argument to ShellCommand and its subclasses creates new log files and fills them in realtime by asking the worker to watch an actual file on disk. The worker will look for additions in the target file and report them back to the BuildStep. These
<johnsdea>
additions will be added to the log file by calling addStdout."
<johnsdea>
So, it's watching for changes to a file which isn't being changed in that step, and thus creating an empty entry for that file on the step (since we don't set lazyLogFiles)
<p12tic>
Could it be that addLogFile enables follow=True by default? LogFileWatcher.poll() reads file from beginning if not following
<johnsdea>
Hm, not sure if our version of Buildbot supports a follow argument; is that new to v3.0+?
<johnsdea>
That'ss in Buildbot worker -- how would we go about making the master communicate to the worker that the logfile should be poll'd?
<p12tic>
Could it be that you're adding the log observer after you've launched the command?
<p12tic>
In that case you'd get only updates from the point you've added the observer and it could be that the bulk of the file has already been arrived
<johnsdea>
No, because we add the logFile as part of constructing the command.
<johnsdea>
Sorry if I'm miscommunicating. The logfile already exists, and isn't being modified at all.
<johnsdea>
We're basically just trying to upload / attach it to buildbot underneath a step.
<p12tic>
I understand, that should work.
<p12tic>
Could you try to launch a separate toy Buildbot instance and try to reproduce the problem on v3.x using the logfiles argument to shell command?
<p12tic>
If it reproduces, I will look into it. Fixing it on v3.x would likely offer a way to workaround the problem on older versions of Buildbot
<p12tic>
Maybe you'll be able to just apply the same patch
<johnsdea>
^ I was able to confirm that by calling `touch` on the file during the script the step runs (which causes MTIME to change, thereby not hitting the early return), it works as expected.
jcarl43 has quit [Quit: WeeChat 3.1]
aakashjain has quit [Read error: Connection reset by peer]