cli: use same offset when following single or multiple alloc logs. (#18604)

This commit is contained in:
James Rasell
2023-10-03 08:43:14 +01:00
committed by GitHub
parent 3d62438876
commit df16c96a9f
2 changed files with 5 additions and 2 deletions

3
.changelog/18604.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
cli: Use same offset when following single or multiple alloc logs
```

View File

@@ -358,7 +358,7 @@ func (l *AllocLogsCommand) tailMultipleFiles(client *api.Client, alloc *api.Allo
defer close(cancel)
stdoutFrames, stdoutErrCh := client.AllocFS().Logs(
alloc, true, l.task, api.FSLogNameStdout, api.OriginEnd, 1, cancel, nil)
alloc, true, l.task, api.FSLogNameStdout, api.OriginEnd, 0, cancel, nil)
// Setting up the logs stream can fail, therefore we need to check the
// error channel before continuing further.
@@ -369,7 +369,7 @@ func (l *AllocLogsCommand) tailMultipleFiles(client *api.Client, alloc *api.Allo
}
stderrFrames, stderrErrCh := client.AllocFS().Logs(
alloc, true, l.task, api.FSLogNameStderr, api.OriginEnd, 1, cancel, nil)
alloc, true, l.task, api.FSLogNameStderr, api.OriginEnd, 0, cancel, nil)
// Setting up the logs stream can fail, therefore we need to check the
// error channel before continuing further.