Skip to content

Commit 522a28a

Browse files
CR's fixes
1 parent bec0fdc commit 522a28a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

coderd/prebuilds/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
)
1111

1212
var (
13-
ErrNoClaimablePrebuiltWorkspaces = xerrors.New("no claimable prebuilt workspaces found")
14-
ErrAGPLDoesNotSupportPrebuilds = xerrors.New("prebuild-related functionality is not supported under the AGPL license")
13+
ErrNoClaimablePrebuiltWorkspaces = xerrors.New("no claimable prebuilt workspaces found")
14+
ErrAGPLDoesNotSupportPrebuiltWorkspaces = xerrors.New("prebuilt workspaces functionality is not supported under the AGPL license")
1515
)
1616

1717
// ReconciliationOrchestrator manages the lifecycle of prebuild reconciliation.

coderd/prebuilds/noop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type NoopClaimer struct{}
2727

2828
func (NoopClaimer) Claim(context.Context, uuid.UUID, string, uuid.UUID) (*uuid.UUID, error) {
2929
// Not entitled to claim prebuilds in AGPL version.
30-
return nil, ErrAGPLDoesNotSupportPrebuilds
30+
return nil, ErrAGPLDoesNotSupportPrebuiltWorkspaces
3131
}
3232

3333
func (NoopClaimer) Initiator() uuid.UUID {

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ func createWorkspace(
654654
// we fall back to creating a new workspace. Otherwise, propagate the unexpected error.
655655
if err != nil &&
656656
!errors.Is(err, prebuilds.ErrNoClaimablePrebuiltWorkspaces) &&
657-
!errors.Is(err, prebuilds.ErrAGPLDoesNotSupportPrebuilds) {
657+
!errors.Is(err, prebuilds.ErrAGPLDoesNotSupportPrebuiltWorkspaces) {
658658
return xerrors.Errorf("failed to claim prebuilt workspace: %w", err)
659659
}
660660
}

enterprise/coderd/prebuilds/claim_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestClaimPrebuild(t *testing.T) {
114114
"AGPL does not support prebuilds error is returned": {
115115
expectPrebuildClaimed: false,
116116
markPrebuildsClaimable: true,
117-
claimingErr: agplprebuilds.ErrAGPLDoesNotSupportPrebuilds,
117+
claimingErr: agplprebuilds.ErrAGPLDoesNotSupportPrebuiltWorkspaces,
118118
},
119119
"unexpected claiming error is returned": {
120120
expectPrebuildClaimed: false,
@@ -230,7 +230,7 @@ func TestClaimPrebuild(t *testing.T) {
230230
})
231231

232232
isNoPrebuiltWorkspaces := errors.Is(tc.claimingErr, agplprebuilds.ErrNoClaimablePrebuiltWorkspaces)
233-
isUnsupported := errors.Is(tc.claimingErr, agplprebuilds.ErrAGPLDoesNotSupportPrebuilds)
233+
isUnsupported := errors.Is(tc.claimingErr, agplprebuilds.ErrAGPLDoesNotSupportPrebuiltWorkspaces)
234234

235235
switch {
236236
case tc.claimingErr != nil && (isNoPrebuiltWorkspaces || isUnsupported):

0 commit comments

Comments
 (0)