Skip to content

Commit 190c4bc

Browse files
committed
fix fake
1 parent 315d869 commit 190c4bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

coderd/database/dbfake/dbfake.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ import (
2020
"golang.org/x/xerrors"
2121

2222
"github.com/coder/coder/coderd/database"
23+
"github.com/coder/coder/coderd/database/db2sdk"
2324
"github.com/coder/coder/coderd/httpapi"
2425
"github.com/coder/coder/coderd/rbac"
2526
"github.com/coder/coder/coderd/util/slice"
27+
"github.com/coder/coder/codersdk"
2628
)
2729

2830
var validProxyByHostnameRegex = regexp.MustCompile(`^[a-zA-Z0-9._-]+$`)
@@ -3424,6 +3426,15 @@ func (q *fakeQuerier) GetWorkspacesEligibleForTransition(ctx context.Context, no
34243426
workspaces = append(workspaces, workspace)
34253427
continue
34263428
}
3429+
3430+
job, err := q.getProvisionerJobByIDNoLock(ctx, build.JobID)
3431+
if err != nil {
3432+
return nil, xerrors.Errorf("get provisioner job by ID: %w", err)
3433+
}
3434+
if db2sdk.ProvisionerJobStatus(job) == codersdk.ProvisionerJobFailed {
3435+
workspaces = append(workspaces, workspace)
3436+
continue
3437+
}
34273438
}
34283439

34293440
return workspaces, nil

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy