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:
Sas Swart
2025-10-08 10:40:54 +02:00
committed by GitHub
parent 037e6f06f5
commit 544f15523c
5 changed files with 9 additions and 16 deletions
-1
View File
@@ -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.