Skip to content

Commit

Permalink
cli: use same offset when following single or multiple alloc logs. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell authored Oct 3, 2023
1 parent 3d62438 commit df16c96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/18604.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cli: Use same offset when following single or multiple alloc logs
```
4 changes: 2 additions & 2 deletions command/alloc_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

1 comment on commit df16c96

@vercel
Copy link

@vercel vercel bot commented on df16c96 Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.