Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: support devcontainer agents in ui and unify backend#18332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 29 commits intomainfrommafredri/feat-agent-devcontainer-injection-6
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
29 commits
Select commitHold shift + click to select a range
765c2cf
backend
mafredriJun 10, 2025
4019358
ui-1
mafredriJun 10, 2025
452dbc9
backend-2
mafredriJun 10, 2025
6a23998
ui-2
mafredriJun 10, 2025
ee3ed36
backend-3
mafredriJun 11, 2025
fc1a90a
ui-3
mafredriJun 11, 2025
88ce78f
ui-wip
mafredriJun 11, 2025
b1431a3
ui-wip2
mafredriJun 13, 2025
2c2bf28
backend fix test after rebase
mafredriJun 13, 2025
18e1593
ui-final?
mafredriJun 13, 2025
df28ff9
oh no I accidentally the coercion
mafredriJun 13, 2025
9f69f69
site: remove circ dependency
mafredriJun 13, 2025
ecfe483
site: add tests
mafredriJun 13, 2025
71c61b6
whelp
mafredriJun 13, 2025
2e1c31f
tweak app display
mafredriJun 13, 2025
7e41c15
add port forward test
mafredriJun 13, 2025
79e1844
cleanup
mafredriJun 13, 2025
8ce0aec
dont show content (due to margin) when there are no apps
mafredriJun 16, 2025
d3bda05
rewrite styles as Tailwind CSS
mafredriJun 16, 2025
d4f208b
review comments
mafredriJun 16, 2025
7e5ede0
review comments
mafredriJun 16, 2025
7a3674a
add comment about idempotency
mafredriJun 16, 2025
c0607b1
switch -> if
mafredriJun 16, 2025
e1ea4bf
rename apps to agentapps
mafredriJun 16, 2025
f150bad
refactor to use mutation
mafredriJun 16, 2025
2b22ee2
adjust refetch trigger
mafredriJun 17, 2025
4b9d218
fix linter
mafredriJun 17, 2025
e021c8d
Update agent/agentcontainers/api.go
mafredriJun 17, 2025
0c44de8
clarify todo
mafredriJun 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
356 changes: 189 additions & 167 deletionsagent/agentcontainers/api.go
View file
Open in desktop

Large diffs are not rendered by default.

180 changes: 112 additions & 68 deletionsagent/agentcontainers/api_test.go
View file
Open in desktop

Large diffs are not rendered by default.

69 changes: 57 additions & 12 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

69 changes: 57 additions & 12 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

16 changes: 7 additions & 9 deletionscoderd/workspaceagents_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1403,15 +1403,13 @@ func TestWorkspaceAgentRecreateDevcontainer(t *testing.T) {
agentcontainers.DevcontainerConfigFileLabel: configFile,
}
devContainer = codersdk.WorkspaceAgentContainer{
ID: uuid.NewString(),
CreatedAt: dbtime.Now(),
FriendlyName: testutil.GetRandomName(t),
Image: "busybox:latest",
Labels: dcLabels,
Running: true,
Status: "running",
DevcontainerDirty: true,
DevcontainerStatus: codersdk.WorkspaceAgentDevcontainerStatusRunning,
ID: uuid.NewString(),
CreatedAt: dbtime.Now(),
FriendlyName: testutil.GetRandomName(t),
Image: "busybox:latest",
Labels: dcLabels,
Running: true,
Status: "running",
}
plainContainer = codersdk.WorkspaceAgentContainer{
ID: uuid.NewString(),
Expand Down
25 changes: 11 additions & 14 deletionscodersdk/workspaceagents.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -393,12 +393,6 @@ func (c *Client) WorkspaceAgentListeningPorts(ctx context.Context, agentID uuid.
return listeningPorts, json.NewDecoder(res.Body).Decode(&listeningPorts)
}

// WorkspaceAgentDevcontainersResponse is the response to the devcontainers
// request.
type WorkspaceAgentDevcontainersResponse struct {
Devcontainers []WorkspaceAgentDevcontainer `json:"devcontainers"`
}

// WorkspaceAgentDevcontainerStatus is the status of a devcontainer.
type WorkspaceAgentDevcontainerStatus string

Expand All@@ -422,6 +416,15 @@ type WorkspaceAgentDevcontainer struct {
Status WorkspaceAgentDevcontainerStatus `json:"status"`
Dirty bool `json:"dirty"`
Container *WorkspaceAgentContainer `json:"container,omitempty"`
Agent *WorkspaceAgentDevcontainerAgent `json:"agent,omitempty"`
}

// WorkspaceAgentDevcontainerAgent represents the sub agent for a
// devcontainer.
type WorkspaceAgentDevcontainerAgent struct {
ID uuid.UUID `json:"id" format:"uuid"`
Name string `json:"name"`
Directory string `json:"directory"`
}

// WorkspaceAgentContainer describes a devcontainer of some sort
Expand DownExpand Up@@ -450,14 +453,6 @@ type WorkspaceAgentContainer struct {
// Volumes is a map of "things" mounted into the container. Again, this
// is somewhat implementation-dependent.
Volumes map[string]string `json:"volumes"`
// DevcontainerStatus is the status of the devcontainer, if this
// container is a devcontainer. This is used to determine if the
// devcontainer is running, stopped, starting, or in an error state.
DevcontainerStatus WorkspaceAgentDevcontainerStatus `json:"devcontainer_status,omitempty"`
// DevcontainerDirty is true if the devcontainer configuration has changed
// since the container was created. This is used to determine if the
// container needs to be rebuilt.
DevcontainerDirty bool `json:"devcontainer_dirty"`
}

func (c *WorkspaceAgentContainer) Match(idOrName string) bool {
Expand DownExpand Up@@ -486,6 +481,8 @@ type WorkspaceAgentContainerPort struct {
// WorkspaceAgentListContainersResponse is the response to the list containers
// request.
type WorkspaceAgentListContainersResponse struct {
// Devcontainers is a list of devcontainers visible to the workspace agent.
Devcontainers []WorkspaceAgentDevcontainer `json:"devcontainers"`
// Containers is a list of containers visible to the workspace agent.
Containers []WorkspaceAgentContainer `json:"containers"`
// Warnings is a list of warnings that may have occurred during the
Expand Down
41 changes: 39 additions & 2 deletionsdocs/reference/api/agents.md
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp