Skip to content

fix: Stop sending before logs when after is specified #2585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Stop sending before logs when after is specified
This fixes duplicate logs appearing in completed jos!
  • Loading branch information
kylecarbs committed Jun 22, 2022
commit ad2217e229729d09c5322fe07bc0a7de7e3b131c
5 changes: 4 additions & 1 deletion coderd/provisionerjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ func (api *API) provisionerJobLogs(rw http.ResponseWriter, r *http.Request, job
}
before = time.UnixMilli(beforeMS)
} else {
before = database.Now()
// If we're following, we don't want logs before a timestamp!
if !follow {
before = database.Now()
}
}

if !follow {
Expand Down