mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
WIP: claim triggering manifest push to agent
Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
@ -72,8 +72,10 @@ type Builder struct {
|
||||
lastBuildJob *database.ProvisionerJob
|
||||
parameterNames *[]string
|
||||
parameterValues *[]string
|
||||
prebuild bool
|
||||
runningWorkspaceAgentID uuid.UUID
|
||||
|
||||
prebuild bool
|
||||
prebuildClaimBy uuid.UUID
|
||||
runningWorkspaceAgentID uuid.UUID
|
||||
|
||||
verifyNoLegacyParametersOnce bool
|
||||
}
|
||||
@ -176,6 +178,12 @@ func (b Builder) MarkPrebuild() Builder {
|
||||
return b
|
||||
}
|
||||
|
||||
func (b Builder) MarkPrebuildClaimBy(userID uuid.UUID) Builder {
|
||||
// nolint: revive
|
||||
b.prebuildClaimBy = userID
|
||||
return b
|
||||
}
|
||||
|
||||
// RunningWorkspaceAgentID is only used for prebuilds; see the associated field in `provisionerdserver.WorkspaceProvisionJob`.
|
||||
func (b Builder) RunningWorkspaceAgentID(id uuid.UUID) Builder {
|
||||
// nolint: revive
|
||||
@ -311,6 +319,7 @@ func (b *Builder) buildTx(authFunc func(action policy.Action, object rbac.Object
|
||||
WorkspaceBuildID: workspaceBuildID,
|
||||
LogLevel: b.logLevel,
|
||||
IsPrebuild: b.prebuild,
|
||||
IsPrebuildClaimByUser: b.prebuildClaimBy,
|
||||
RunningWorkspaceAgentID: b.runningWorkspaceAgentID,
|
||||
})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user