Skip to content

fix(coderd): subscribe to workspace when streaming agent logs to detect outdated build #9729

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 4 commits into from
Sep 19, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update workspaceagents.go
  • Loading branch information
mafredri authored Sep 18, 2023
commit 2de6c3a3df6f4df65cc97ab1406ad24f7a986aef
1 change: 0 additions & 1 deletion coderd/workspaceagents.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ func (api *API) workspaceAgentLogs(rw http.ResponseWriter, r *http.Request) {

// Subscribe to workspace to detect new builds.
closeSubscribeWorkspace, err := api.Pubsub.Subscribe(codersdk.WorkspaceNotifyChannel(workspace.ID), func(_ context.Context, _ []byte) {
// The message is not important, we're tracking lastSentLogID manually.
select {
case workspaceNotifyCh <- struct{}{}:
default:
Expand Down