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

Commit83c4611

Browse files
chore: revert "feat: include latest build id in task responses" (#20184)
Reverts#20181I realized we don’t need this in the task response. When loading a task,we already need much more workspace information, so it makes more senseto fetch the workspace data separately instead of trying to embed allits details into the response.I think we can keep the task response clean and focused on the essentialinformation needed to list tasks. For more specific details, we canfetch the related resources as needed. So, I’m reverting this PR.
1 parent23a44d1 commit83c4611

File tree

6 files changed

+0
-7
lines changed

6 files changed

+0
-7
lines changed

‎cli/exp_task_status_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ STATE CHANGED STATUS HEALTHY STATE MESSAGE
193193
"workspace_agent_id": null,
194194
"workspace_agent_lifecycle": null,
195195
"workspace_agent_health": null,
196-
"latest_build_id": null,
197196
"initial_prompt": "",
198197
"status": "running",
199198
"current_state": {

‎coderd/aitasks.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ func taskFromWorkspace(ws codersdk.Workspace, initialPrompt string) codersdk.Tas
272272
WorkspaceAgentID:taskAgentID,
273273
WorkspaceAgentLifecycle:taskAgentLifecycle,
274274
WorkspaceAgentHealth:taskAgentHealth,
275-
LatestBuildID: uuid.NullUUID{Valid:true,UUID:ws.LatestBuild.ID},
276275
CreatedAt:ws.CreatedAt,
277276
UpdatedAt:ws.UpdatedAt,
278277
InitialPrompt:initialPrompt,

‎coderd/aitasks_test.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ func TestTasks(t *testing.T) {
270270
assert.Equal(t,wantPrompt,got.InitialPrompt,"task prompt should match the AI Prompt parameter")
271271
assert.Equal(t,workspace.Name,got.Name,"task name should map from workspace name")
272272
assert.Equal(t,workspace.ID,got.WorkspaceID.UUID,"workspace id should match")
273-
assert.Equal(t,workspace.LatestBuild.ID,got.LatestBuildID.UUID,"latest build id should match")
274273
// Status should be populated via app status or workspace status mapping.
275274
assert.NotEmpty(t,got.Status,"task status should not be empty")
276275
})
@@ -321,7 +320,6 @@ func TestTasks(t *testing.T) {
321320
assert.Equal(t,workspace.Name,task.Name,"task name should map from workspace name")
322321
assert.Equal(t,wantPrompt,task.InitialPrompt,"task prompt should match the AI Prompt parameter")
323322
assert.Equal(t,workspace.ID,task.WorkspaceID.UUID,"workspace id should match")
324-
assert.Equal(t,workspace.LatestBuild.ID,task.LatestBuildID.UUID,"latest build id should match")
325323
assert.NotEmpty(t,task.Status,"task status should not be empty")
326324

327325
// Stop the workspace

‎codersdk/aitasks.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ type Task struct {
119119
WorkspaceAgentID uuid.NullUUID`json:"workspace_agent_id" format:"uuid" table:"workspace agent id"`
120120
WorkspaceAgentLifecycle*WorkspaceAgentLifecycle`json:"workspace_agent_lifecycle" table:"workspace agent lifecycle"`
121121
WorkspaceAgentHealth*WorkspaceAgentHealth`json:"workspace_agent_health" table:"workspace agent health"`
122-
LatestBuildID uuid.NullUUID`json:"latest_build_id" format:"uuid" table:"latest build id"`
123122
InitialPromptstring`json:"initial_prompt" table:"initial prompt"`
124123
StatusWorkspaceStatus`json:"status" enums:"pending,starting,running,stopping,stopped,failed,canceling,canceled,deleting,deleted" table:"status"`
125124
CurrentState*TaskStateEntry`json:"current_state" table:"cs,recursive_inline"`

‎site/src/api/typesGenerated.ts‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/testHelpers/entities.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5031,7 +5031,6 @@ export const MockTask: TypesGen.Task = {
50315031
workspace_agent_id:MockWorkspaceAgent.id,
50325032
workspace_agent_lifecycle:MockWorkspaceAgent.lifecycle_state,
50335033
workspace_agent_health:MockWorkspaceAgent.health,
5034-
latest_build_id:MockWorkspace.latest_build.id,
50355034
initial_prompt:"Perform some task",
50365035
status:"running",
50375036
current_state:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp