- Notifications
You must be signed in to change notification settings - Fork1.1k
feat: reinitialize agents when a prebuilt workspace is claimed#17475
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from9 commits
c09c9b9476fe718c8bca67ce4eea52ac64e362db7cdcc7379ff66b3fefff5d9cebd5db26791389feebefb117b5ca22b4149bbd2c758042017e8dcee725f97ba9b156721ee970e54d7e727998581d93003763fc120f879c761784c9604eb27bf4d2cf38b4f0d20df5384bb3b6883972db146b1585eb16cd730d803150adc0b4ecf103fa3edf7e45919a63250872125ecb65eea7e1339f3c1a8ba65363dcc7ad9b6d394571d890747bb3870dbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -36,6 +36,9 @@ import ( | ||
| "tailscale.com/util/clientmetric" | ||
| "cdr.dev/slog" | ||
| "github.com/coder/retry" | ||
SasSwart marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| "github.com/coder/clistat" | ||
| "github.com/coder/coder/v2/agent/agentcontainers" | ||
| "github.com/coder/coder/v2/agent/agentexec" | ||
| @@ -53,7 +56,6 @@ import ( | ||
| "github.com/coder/coder/v2/tailnet" | ||
| tailnetproto "github.com/coder/coder/v2/tailnet/proto" | ||
| "github.com/coder/quartz" | ||
| ) | ||
| const ( | ||
| @@ -365,9 +367,11 @@ func (a *agent) runLoop() { | ||
| if ctx.Err() != nil { | ||
| // Context canceled errors may come from websocket pings, so we | ||
| // don't want to use `errors.Is(err, context.Canceled)` here. | ||
| a.logger.Warn(ctx, "runLoop exited with error", slog.Error(ctx.Err())) | ||
| return | ||
| } | ||
| if a.isClosed() { | ||
| a.logger.Warn(ctx, "runLoop exited because agent is closed") | ||
| return | ||
| } | ||
| if errors.Is(err, io.EOF) { | ||
| @@ -1048,7 +1052,11 @@ func (a *agent) run() (retErr error) { | ||
| return a.statsReporter.reportLoop(ctx, aAPI) | ||
| }) | ||
| err = connMan.wait() | ||
| if err != nil { | ||
| a.logger.Warn(context.Background(), "connection manager errored", slog.Error(err)) | ||
SasSwart marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| } | ||
| return err | ||
| } | ||
| // handleManifest returns a function that fetches and processes the manifest | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.