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(agent/agentcontainers): support apps for dev container agents#18346

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
DanielleMaywood merged 16 commits intomainfromdm-sub-agent-apps-configuration-2
Jun 18, 2025
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
eb8a469
feat(agent/agentcontainers): support apps for dev container agents
DanielleMaywoodJun 12, 2025
0dc5bb2
chore: copilot feedback
DanielleMaywoodJun 12, 2025
bcd6689
chore: more changes
DanielleMaywoodJun 13, 2025
91fd4e7
chore: pass env variables + remove accidental commit
DanielleMaywoodJun 13, 2025
c273b23
chore: fix some tests
DanielleMaywoodJun 13, 2025
8698100
chore: fix issues
DanielleMaywoodJun 17, 2025
8ec61b6
chore: fix and update test
DanielleMaywoodJun 17, 2025
ab2e82e
chore: fix oopsie
DanielleMaywoodJun 18, 2025
4db77af
test: add organization sharing level
DanielleMaywoodJun 18, 2025
d3a2583
chore: CODER_DEPLOYMENT_URL -> CODER_URL
DanielleMaywoodJun 18, 2025
20e832a
chore: remove all the pointers
DanielleMaywoodJun 18, 2025
336997b
chore: handle in CloneConfig as well
DanielleMaywoodJun 18, 2025
0ae2616
chore: rename WithUserName and WithWorkspaceName to WithManifestInfo
DanielleMaywoodJun 18, 2025
e17b228
chore: just use PATH
DanielleMaywoodJun 18, 2025
d1da3a1
chore: app deduplication
DanielleMaywoodJun 18, 2025
c6652a1
chore: appease linter
DanielleMaywoodJun 18, 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
PrevPrevious commit
NextNext commit
chore: fix and update test
  • Loading branch information
@DanielleMaywood
DanielleMaywood committedJun 18, 2025
commit8ec61b6b0e29547a2f462fe2fa45726a014622e0
16 changes: 8 additions & 8 deletionsagent/agentcontainers/api_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -69,7 +69,7 @@ type fakeDevcontainerCLI struct {
execErrC chan func(cmd string, args ...string) error // If set, send fn to return err, nil or close to return execErr.
readConfig agentcontainers.DevcontainerConfig
readConfigErr error
readConfigErrC chan func(envs []string)(agentcontainers.DevcontainerConfig,error)
readConfigErrC chan func(envs []string) error
}

func (f *fakeDevcontainerCLI) Up(ctx context.Context, _, _ string, _ ...agentcontainers.DevcontainerCLIUpOptions) (string, error) {
Expand DownExpand Up@@ -107,7 +107,7 @@ func (f *fakeDevcontainerCLI) ReadConfig(ctx context.Context, _, _ string, envs
return agentcontainers.DevcontainerConfig{}, ctx.Err()
case fn, ok := <-f.readConfigErrC:
if ok {
return fn(envs)
returnf.readConfig,fn(envs)
}
}
}
Expand DownExpand Up@@ -1255,7 +1255,7 @@ func TestAPI(t *testing.T) {
}
fakeDCCLI = &fakeDevcontainerCLI{
execErrC: make(chan func(cmd string, args ...string) error, 1),
readConfigErrC: make(chan func(envs []string)(agentcontainers.DevcontainerConfig,error), 1),
readConfigErrC: make(chan func(envs []string) error, 1),
}

testContainer = codersdk.WorkspaceAgentContainer{
Expand DownExpand Up@@ -1304,7 +1304,7 @@ func TestAPI(t *testing.T) {
close(fakeSAC.createErrC)
close(fakeSAC.deleteErrC)
close(fakeDCCLI.execErrC)
deferclose(fakeDCCLI.readConfigErrC)
close(fakeDCCLI.readConfigErrC)

_ = api.Close()
})
Expand All@@ -1318,12 +1318,12 @@ func TestAPI(t *testing.T) {
assert.Empty(t, args)
return nil
}) // Exec pwd.
testutil.RequireSend(ctx, t, fakeDCCLI.readConfigErrC, func(envs []string)(agentcontainers.DevcontainerConfig,error) {
testutil.RequireSend(ctx, t, fakeDCCLI.readConfigErrC, func(envs []string) error {
assert.Contains(t, envs, "CODER_WORKSPACE_AGENT_NAME=test-container")
assert.Contains(t, envs, "CODER_WORKSPACE_NAME=test-workspace")
assert.Contains(t, envs, "CODER_WORKSPACE_OWNER_NAME=test-user")
assert.Contains(t, envs, "CODER_DEPLOYMENT_URL=test-subagent-url")
returnagentcontainers.DevcontainerConfig{},nil
return nil
})

// Make sure the ticker function has been registered
Expand DownExpand Up@@ -1465,12 +1465,12 @@ func TestAPI(t *testing.T) {
assert.Empty(t, args)
return nil
}) // Exec pwd.
testutil.RequireSend(ctx, t, fakeDCCLI.readConfigErrC, func(envs []string)(agentcontainers.DevcontainerConfig,error) {
testutil.RequireSend(ctx, t, fakeDCCLI.readConfigErrC, func(envs []string) error {
assert.Contains(t, envs, "CODER_WORKSPACE_AGENT_NAME=test-container")
assert.Contains(t, envs, "CODER_WORKSPACE_NAME=test-workspace")
assert.Contains(t, envs, "CODER_WORKSPACE_OWNER_NAME=test-user")
assert.Contains(t, envs, "CODER_DEPLOYMENT_URL=test-subagent-url")
returnagentcontainers.DevcontainerConfig{},nil
return nil
})

err = api.RefreshContainers(ctx)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp