mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(agent/agentcontainers): recreate devcontainers concurrently (#18042)
This change introduces a refactor of the devcontainers recreation logic which is now handled asynchronously rather than being request scoped. The response was consequently changed from "No Content" to "Accepted" to reflect this. A new `Status` field was introduced to the devcontainer struct which replaces `Running` (bool). This reflects that the devcontainer can now be in various states (starting, running, stopped or errored). The status field also protects against multiple concurrent recrations, as long as they are initiated via the API. Updates #16424
This commit is contained in:
Generated
+11
-1
@@ -3368,11 +3368,21 @@ export interface WorkspaceAgentDevcontainer {
|
||||
readonly name: string;
|
||||
readonly workspace_folder: string;
|
||||
readonly config_path?: string;
|
||||
readonly running: boolean;
|
||||
readonly status: WorkspaceAgentDevcontainerStatus;
|
||||
readonly dirty: boolean;
|
||||
readonly container?: WorkspaceAgentContainer;
|
||||
}
|
||||
|
||||
// From codersdk/workspaceagents.go
|
||||
export type WorkspaceAgentDevcontainerStatus =
|
||||
| "error"
|
||||
| "running"
|
||||
| "starting"
|
||||
| "stopped";
|
||||
|
||||
export const WorkspaceAgentDevcontainerStatuses: WorkspaceAgentDevcontainerStatus[] =
|
||||
["error", "running", "starting", "stopped"];
|
||||
|
||||
// From codersdk/workspaceagents.go
|
||||
export interface WorkspaceAgentDevcontainersResponse {
|
||||
readonly devcontainers: readonly WorkspaceAgentDevcontainer[];
|
||||
|
||||
Reference in New Issue
Block a user