mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(agent): delay containerAPI init to ensure startup scripts run before (#18630)
This commit is contained in:
@@ -530,7 +530,6 @@ func (api *API) updateContainers(ctx context.Context) error {
|
||||
// will clear up on the next update.
|
||||
if !errors.Is(err, context.Canceled) {
|
||||
api.mu.Lock()
|
||||
api.containers = codersdk.WorkspaceAgentListContainersResponse{}
|
||||
api.containersErr = err
|
||||
api.mu.Unlock()
|
||||
}
|
||||
@@ -947,7 +946,7 @@ func (api *API) CreateDevcontainer(workspaceFolder, configPath string, opts ...D
|
||||
slog.F("devcontainer_id", dc.ID),
|
||||
slog.F("devcontainer_name", dc.Name),
|
||||
slog.F("workspace_folder", dc.WorkspaceFolder),
|
||||
slog.F("config_path", configPath),
|
||||
slog.F("config_path", dc.ConfigPath),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user