+1261
-662
lines changedFilter options
+1261
-662
lines changed Original file line number Diff line number Diff line change
@@ -1403,15 +1403,13 @@ func TestWorkspaceAgentRecreateDevcontainer(t *testing.T) {
1403
1403
agentcontainers.DevcontainerConfigFileLabel: configFile,
1404
1404
}
1405
1405
devContainer = codersdk.WorkspaceAgentContainer{
1406
-
ID: uuid.NewString(),
1407
-
CreatedAt: dbtime.Now(),
1408
-
FriendlyName: testutil.GetRandomName(t),
1409
-
Image: "busybox:latest",
1410
-
Labels: dcLabels,
1411
-
Running: true,
1412
-
Status: "running",
1413
-
DevcontainerDirty: true,
1414
-
DevcontainerStatus: codersdk.WorkspaceAgentDevcontainerStatusRunning,
1406
+
ID: uuid.NewString(),
1407
+
CreatedAt: dbtime.Now(),
1408
+
FriendlyName: testutil.GetRandomName(t),
1409
+
Image: "busybox:latest",
1410
+
Labels: dcLabels,
1411
+
Running: true,
1412
+
Status: "running",
1415
1413
}
1416
1414
plainContainer = codersdk.WorkspaceAgentContainer{
1417
1415
ID: uuid.NewString(),
Original file line number Diff line number Diff line change
@@ -393,12 +393,6 @@ func (c *Client) WorkspaceAgentListeningPorts(ctx context.Context, agentID uuid.
393
393
return listeningPorts, json.NewDecoder(res.Body).Decode(&listeningPorts)
394
394
}
395
395
396
-
// WorkspaceAgentDevcontainersResponse is the response to the devcontainers
397
-
// request.
398
-
type WorkspaceAgentDevcontainersResponse struct {
399
-
Devcontainers []WorkspaceAgentDevcontainer `json:"devcontainers"`
400
-
}
401
-
402
396
// WorkspaceAgentDevcontainerStatus is the status of a devcontainer.
403
397
type WorkspaceAgentDevcontainerStatus string
404
398
@@ -422,6 +416,15 @@ type WorkspaceAgentDevcontainer struct {
422
416
Status WorkspaceAgentDevcontainerStatus `json:"status"`
423
417
Dirty bool `json:"dirty"`
424
418
Container *WorkspaceAgentContainer `json:"container,omitempty"`
419
+
Agent *WorkspaceAgentDevcontainerAgent `json:"agent,omitempty"`
420
+
}
421
+
422
+
// WorkspaceAgentDevcontainerAgent represents the sub agent for a
423
+
// devcontainer.
424
+
type WorkspaceAgentDevcontainerAgent struct {
425
+
ID uuid.UUID `json:"id" format:"uuid"`
426
+
Name string `json:"name"`
427
+
Directory string `json:"directory"`
425
428
}
426
429
427
430
// WorkspaceAgentContainer describes a devcontainer of some sort
@@ -450,14 +453,6 @@ type WorkspaceAgentContainer struct {
450
453
// Volumes is a map of "things" mounted into the container. Again, this
451
454
// is somewhat implementation-dependent.
452
455
Volumes map[string]string `json:"volumes"`
453
-
// DevcontainerStatus is the status of the devcontainer, if this
454
-
// container is a devcontainer. This is used to determine if the
455
-
// devcontainer is running, stopped, starting, or in an error state.
456
-
DevcontainerStatus WorkspaceAgentDevcontainerStatus `json:"devcontainer_status,omitempty"`
457
-
// DevcontainerDirty is true if the devcontainer configuration has changed
458
-
// since the container was created. This is used to determine if the
459
-
// container needs to be rebuilt.
460
-
DevcontainerDirty bool `json:"devcontainer_dirty"`
461
456
}
462
457
463
458
func (c *WorkspaceAgentContainer) Match(idOrName string) bool {
@@ -486,6 +481,8 @@ type WorkspaceAgentContainerPort struct {
486
481
// WorkspaceAgentListContainersResponse is the response to the list containers
487
482
// request.
488
483
type WorkspaceAgentListContainersResponse struct {
484
+
// Devcontainers is a list of devcontainers visible to the workspace agent.
485
+
Devcontainers []WorkspaceAgentDevcontainer `json:"devcontainers"`
489
486
// Containers is a list of containers visible to the workspace agent.
490
487
Containers []WorkspaceAgentContainer `json:"containers"`
491
488
// Warnings is a list of warnings that may have occurred during the
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4