Skip to content

Commit 92a4b99

Browse files
committed
nits
1 parent 459ce5c commit 92a4b99

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4464,6 +4464,7 @@ func (q *FakeQuerier) GetProvisionerDaemons(_ context.Context) ([]database.Provi
44644464
defer q.mutex.RUnlock()
44654465

44664466
if len(q.provisionerDaemons) == 0 {
4467+
// Returning err=nil here for consistency with real querier
44674468
return []database.ProvisionerDaemon{}, nil
44684469
}
44694470
// copy the data so that the caller can't manipulate any data inside dbmem

coderd/workspacebuilds.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,10 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
424424
return
425425
}
426426

427-
var qpr database.GetProvisionerJobsByIDsWithQueuePositionRow
427+
var queuePos database.GetProvisionerJobsByIDsWithQueuePositionRow
428428
if provisionerJob != nil {
429-
qpr.ProvisionerJob = *provisionerJob
430-
qpr.QueuePosition = 0
429+
queuePos.ProvisionerJob = *provisionerJob
430+
queuePos.QueuePosition = 0
431431
if err := provisionerjobs.PostJob(api.Pubsub, *provisionerJob); err != nil {
432432
// Client probably doesn't care about this error, so just log it.
433433
api.Logger.Error(ctx, "failed to post provisioner job to pubsub", slog.Error(err))
@@ -468,7 +468,7 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
468468
apiBuild, err := api.convertWorkspaceBuild(
469469
*workspaceBuild,
470470
workspace,
471-
qpr,
471+
queuePos,
472472
[]database.WorkspaceResource{},
473473
[]database.WorkspaceResourceMetadatum{},
474474
[]database.WorkspaceAgent{},

site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceDeleteDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const WorkspaceDeleteDialog: FC<WorkspaceDeleteDialogProps> = ({
4949
// usually means that builds are failing as well.
5050
// b) No provisioner is available to delete the workspace, which will
5151
// cause the job to remain in the "pending" state indefinitely.
52-
// The assumption here is that and admin will cancel the job.
52+
// The assumption here is that an admin will cancel the job.
5353
const canOrphan =
5454
canDeleteFailedWorkspace &&
5555
(workspace.latest_build.status === "failed" ||

0 commit comments

Comments
 (0)