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

Commit25ec082

Browse files
committed
fix(agent/agentcontainers): make sure arch is set for sub agents
1 parent5e3a225 commit25ec082

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎agent/agentcontainers/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,8 @@ func (api *API) maybeInjectSubAgentIntoContainerLocked(ctx context.Context, dc c
10951095

10961096
subAgentConfig:=proc.agent.CloneConfig(dc)
10971097
ifproc.agent.ID==uuid.Nil||maybeRecreateSubAgent {
1098+
subAgentConfig.Architecture=arch
1099+
10981100
// Detect workspace folder by executing `pwd` in the container.
10991101
// NOTE(mafredri): This is a quick and dirty way to detect the
11001102
// workspace folder inside the container. In the future we will

‎agent/agentcontainers/api_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ func (m *fakeSubAgentClient) Create(ctx context.Context, agent agentcontainers.S
252252
}
253253
}
254254
}
255+
ifagent.Name=="" {
256+
return agentcontainers.SubAgent{},xerrors.New("name must be set")
257+
}
258+
ifagent.Architecture=="" {
259+
return agentcontainers.SubAgent{},xerrors.New("architecture must be set")
260+
}
261+
ifagent.OperatingSystem=="" {
262+
return agentcontainers.SubAgent{},xerrors.New("operating system must be set")
263+
}
255264
agent.ID=uuid.New()
256265
agent.AuthToken=uuid.New()
257266
ifm.agents==nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp