mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: adjust workspace claims to be initiated by users (#20179)
The prebuilds user never initiates a workspace claim autonomously. A claim can only happen when a user attempts to create a workspace. When listing prebuild provisioner jobs, it would not make sense to see jobs related to users who are creating workspaces and have gotten a prebuilt workspace. When cleaning up an overwhelmed provisioner queue, we should not delete claims as they have humans waiting for them and are not part of the thundering herd. Therefore, this PR ensures that provisioner jobs that claim workspaces are considered to be initiated by the user, not the prebuilds system.
This commit is contained in:
@@ -719,7 +719,6 @@ func createWorkspace(
|
||||
} else {
|
||||
// Prebuild found!
|
||||
workspaceID = claimedWorkspace.ID
|
||||
initiatorID = prebuildsClaimer.Initiator()
|
||||
}
|
||||
|
||||
// We have to refetch the workspace for the joined in fields.
|
||||
|
||||
Reference in New Issue
Block a user