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

Commit75b38f1

Browse files
fix(coderd): ignore sub agents when converting a task to workspace (#19624)
Addresses comment raised on previous PR#19619 (comment)We know we can skip sub agents when searching for which agent is relatedto the task, as this is not an explicitly supported feature at themoment. When we come to properly setting up a Task -> Agent relationshipthis limitation will be dropped.
1 parent26e8a35 commit75b38f1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎coderd/aitasks.go‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,19 @@ func (api *API) tasksFromWorkspaces(ctx context.Context, apiWorkspaces []codersd
217217
// This just picks up the first agent it discovers.
218218
// This approach _might_ break when a task has multiple agents,
219219
// depending on which agent was found first.
220+
//
221+
// We explicitly do not have support for running tasks
222+
// inside of a sub agent at the moment, so we can be sure
223+
// that any sub agents are not the agent we're looking for.
220224
vartaskAgentID uuid.NullUUID
221225
vartaskAgentLifecycle*codersdk.WorkspaceAgentLifecycle
222226
vartaskAgentHealth*codersdk.WorkspaceAgentHealth
223227
for_,resource:=rangews.LatestBuild.Resources {
224228
for_,agent:=rangeresource.Agents {
229+
ifagent.ParentID.Valid {
230+
continue
231+
}
232+
225233
taskAgentID= uuid.NullUUID{Valid:true,UUID:agent.ID}
226234
taskAgentLifecycle=&agent.LifecycleState
227235
taskAgentHealth=&agent.Health

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp