fix(agent/agentcontainers): reset error at start of rebuild (#18686)

Reset the error associated with a devcontainer when a rebuild is requested.
This commit is contained in:
Danielle Maywood
2025-07-01 10:57:43 +01:00
committed by GitHub
parent 258a839d27
commit 7e372f7a35
2 changed files with 24 additions and 8 deletions

View File

@ -946,6 +946,7 @@ func (api *API) handleDevcontainerRecreate(w http.ResponseWriter, r *http.Reques
// devcontainer multiple times in parallel.
dc.Status = codersdk.WorkspaceAgentDevcontainerStatusStarting
dc.Container = nil
dc.Error = ""
api.knownDevcontainers[dc.WorkspaceFolder] = dc
go func() {
_ = api.CreateDevcontainer(dc.WorkspaceFolder, dc.ConfigPath, WithRemoveExistingContainer())