Skip to content

Commit c8a5bb8

Browse files
committed
avoid resetting container in recreate
1 parent 410241d commit c8a5bb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

agent/agentcontainers/api.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,13 @@ func (api *API) handleDevcontainerRecreate(w http.ResponseWriter, r *http.Reques
511511
slog.F("name", api.knownDevcontainers[i].Name),
512512
)
513513
api.knownDevcontainers[i].Dirty = false
514+
// TODO(mafredri): This should be handled by a service that
515+
// updates the devcontainer state periodically and on-demand.
514516
api.knownDevcontainers[i].Container = nil
517+
// Set the modified time to the zero value to indicate that
518+
// the containers list must be refreshed. This will see to
519+
// it that the new container is re-assigned.
520+
api.mtime = time.Time{}
515521
}
516522
return
517523
}

0 commit comments

Comments
 (0)