mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): remove deprecated AITaskSidebarApp column (#20680)
This column was no longer used in `v2.28` and the codersdk field deprecated. Both can now be dropped in `v2.29`. Closes coder/internal#974
This commit is contained in:
@@ -2123,7 +2123,6 @@ func (s *server) completeWorkspaceBuildJob(ctx context.Context, job database.Pro
|
||||
Bool: hasAITask,
|
||||
Valid: true,
|
||||
},
|
||||
SidebarAppID: taskAppID, // SidebarAppID is not required, but kept for API backwards compatibility.
|
||||
HasExternalAgent: sql.NullBool{
|
||||
Bool: hasExternalAgent,
|
||||
Valid: true,
|
||||
|
||||
@@ -3134,7 +3134,6 @@ func TestCompleteJob(t *testing.T) {
|
||||
}
|
||||
|
||||
require.Equal(t, tc.expectAppID, task.WorkspaceAppID)
|
||||
require.Equal(t, tc.expectAppID, build.AITaskSidebarAppID)
|
||||
|
||||
if tc.expectUsageEvent {
|
||||
// Check that a usage event was collected.
|
||||
@@ -4448,19 +4447,18 @@ func seedPreviousWorkspaceStartWithAITask(ctx context.Context, t testing.TB, db
|
||||
agt := dbgen.WorkspaceAgent(t, db, database.WorkspaceAgent{
|
||||
ResourceID: res.ID,
|
||||
})
|
||||
wa := dbgen.WorkspaceApp(t, db, database.WorkspaceApp{
|
||||
_ = dbgen.WorkspaceApp(t, db, database.WorkspaceApp{
|
||||
AgentID: agt.ID,
|
||||
})
|
||||
_ = dbgen.WorkspaceBuild(t, db, database.WorkspaceBuild{
|
||||
BuildNumber: 1,
|
||||
HasAITask: sql.NullBool{Valid: true, Bool: true},
|
||||
AITaskSidebarAppID: uuid.NullUUID{Valid: true, UUID: wa.ID},
|
||||
ID: w.ID,
|
||||
InitiatorID: w.OwnerID,
|
||||
JobID: prevJob.ID,
|
||||
TemplateVersionID: tvs[0].ID,
|
||||
Transition: database.WorkspaceTransitionStart,
|
||||
WorkspaceID: w.ID,
|
||||
BuildNumber: 1,
|
||||
HasAITask: sql.NullBool{Valid: true, Bool: true},
|
||||
ID: w.ID,
|
||||
InitiatorID: w.OwnerID,
|
||||
JobID: prevJob.ID,
|
||||
TemplateVersionID: tvs[0].ID,
|
||||
Transition: database.WorkspaceTransitionStart,
|
||||
WorkspaceID: w.ID,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user