Skip to content

feat: add agent log streaming and follow provisioner format #8170

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 11 commits into from
Jun 28, 2023
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mafredri committed Jun 26, 2023
commit 437c0f09861f7d85be2f915e42cb49eea7b1d61d
8 changes: 4 additions & 4 deletions cli/cliui/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ func Agent(ctx context.Context, writer io.Writer, opts AgentOptions) error {
return
case <-t.C:
agent, err := opts.Fetch(ctx)
if err != nil {
fetchedAgent <- fetchAgent{err: xerrors.Errorf("fetch workspace agent: %w", err)}
return
}
select {
case <-fetchedAgent:
default:
}
if err != nil {
fetchedAgent <- fetchAgent{err: xerrors.Errorf("fetch workspace agent: %w", err)}
return
}
fetchedAgent <- fetchAgent{agent: agent}
t.Reset(opts.FetchInterval)
}
Expand Down