We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent0d426c7 commit663a8c0Copy full SHA for 663a8c0
coderd/workspaces.go
@@ -878,11 +878,7 @@ func requestTemplate(ctx context.Context, rw http.ResponseWriter, req codersdk.C
878
funcclaimPrebuild(ctx context.Context,claimer prebuilds.Claimer,db database.Store,logger slog.Logger,req codersdk.CreateWorkspaceRequest,ownerworkspaceOwner) (*database.Workspace,error) {
879
prebuildsCtx:=dbauthz.AsPrebuildsOrchestrator(ctx)
880
881
-// TODO: do we need a timeout here?
882
-claimCtx,cancel:=context.WithTimeout(prebuildsCtx,time.Second*10)
883
-defercancel()
884
-
885
-claimedID,err:=claimer.Claim(claimCtx,owner.ID,req.Name,req.TemplateVersionPresetID)
+claimedID,err:=claimer.Claim(prebuildsCtx,owner.ID,req.Name,req.TemplateVersionPresetID)
886
iferr!=nil {
887
// TODO: enhance this by clarifying whether this *specific* prebuild failed or whether there are none to claim.
888
returnnil,xerrors.Errorf("claim prebuild: %w",err)