mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
WIP: claim triggering manifest push to agent
Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
@ -685,6 +685,7 @@ func createWorkspace(
|
||||
|
||||
if claimedWorkspace != nil {
|
||||
workspaceID = claimedWorkspace.ID
|
||||
initiatorID = prebuilds.PrebuildOwnerUUID
|
||||
} else {
|
||||
// Workspaces are created without any versions.
|
||||
minimumWorkspace, err := db.InsertWorkspace(ctx, database.InsertWorkspaceParams{
|
||||
@ -727,6 +728,10 @@ func createWorkspace(
|
||||
builder = builder.VersionID(req.TemplateVersionID)
|
||||
}
|
||||
|
||||
if claimedWorkspace != nil {
|
||||
builder = builder.MarkPrebuildClaimBy(owner.ID)
|
||||
}
|
||||
|
||||
workspaceBuild, provisionerJob, provisionerDaemons, err = builder.Build(
|
||||
ctx,
|
||||
db,
|
||||
|
Reference in New Issue
Block a user