Skip to content

Commit b8f9d60

Browse files
committed
dbgen
1 parent 37fdd41 commit b8f9d60

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

coderd/database/dbgen/dbgen.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ func WorkspaceBuild(t testing.TB, db database.Store, orig database.WorkspaceBuil
369369
UUID: uuid.UUID{},
370370
Valid: false,
371371
}),
372+
HasAITask: orig.HasAITask,
372373
})
373374
if err != nil {
374375
return err
@@ -943,6 +944,7 @@ func TemplateVersion(t testing.TB, db database.Store, orig database.TemplateVers
943944
JobID: takeFirst(orig.JobID, uuid.New()),
944945
CreatedBy: takeFirst(orig.CreatedBy, uuid.New()),
945946
SourceExampleID: takeFirst(orig.SourceExampleID, sql.NullString{}),
947+
HasAITask: orig.HasAITask,
946948
})
947949
if err != nil {
948950
return err

coderd/database/dbmem/dbmem.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9382,6 +9382,7 @@ func (q *FakeQuerier) InsertTemplateVersion(_ context.Context, arg database.Inse
93829382
JobID: arg.JobID,
93839383
CreatedBy: arg.CreatedBy,
93849384
SourceExampleID: arg.SourceExampleID,
9385+
HasAITask: arg.HasAITask,
93859386
}
93869387
q.templateVersions = append(q.templateVersions, version)
93879388
return nil
@@ -10061,6 +10062,7 @@ func (q *FakeQuerier) InsertWorkspaceBuild(_ context.Context, arg database.Inser
1006110062
MaxDeadline: arg.MaxDeadline,
1006210063
Reason: arg.Reason,
1006310064
TemplateVersionPresetID: arg.TemplateVersionPresetID,
10065+
HasAITask: arg.HasAITask,
1006410066
}
1006510067
q.workspaceBuilds = append(q.workspaceBuilds, workspaceBuild)
1006610068
return nil

coderd/templateversions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,9 @@ func (api *API) postTemplateVersionsByOrganization(rw http.ResponseWriter, r *ht
17301730
String: req.ExampleID,
17311731
Valid: req.ExampleID != "",
17321732
},
1733+
// appease the exhaustruct linter
1734+
// TODO: set this to whether the template version defines a `coder_ai_task` tf resource
1735+
HasAITask: false,
17331736
})
17341737
if err != nil {
17351738
if database.IsUniqueViolation(err, database.UniqueTemplateVersionsTemplateIDNameKey) {

coderd/wsbuilder/wsbuilder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ func (b *Builder) buildTx(authFunc func(action policy.Action, object rbac.Object
425425
UUID: b.templateVersionPresetID,
426426
Valid: b.templateVersionPresetID != uuid.Nil,
427427
},
428+
// appease the exhaustruct linter
429+
// TODO: set this to whether the build included a `coder_ai_task` tf resource
430+
HasAITask: false,
428431
})
429432
if err != nil {
430433
code := http.StatusInternalServerError

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy