mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
refactor: use specific error for agpl and prebuilds (#17591)
Follow-up PR to https://github.com/coder/coder/pull/17458 Addresses this discussion: https://github.com/coder/coder/pull/17458#discussion_r2055940797
This commit is contained in:
committed by
GitHub
parent
1da27a1ebc
commit
a78f0fc4e1
@@ -9,7 +9,10 @@ import (
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
)
|
||||
|
||||
var ErrNoClaimablePrebuiltWorkspaces = xerrors.New("no claimable prebuilt workspaces found")
|
||||
var (
|
||||
ErrNoClaimablePrebuiltWorkspaces = xerrors.New("no claimable prebuilt workspaces found")
|
||||
ErrAGPLDoesNotSupportPrebuiltWorkspaces = xerrors.New("prebuilt workspaces functionality is not supported under the AGPL license")
|
||||
)
|
||||
|
||||
// ReconciliationOrchestrator manages the lifecycle of prebuild reconciliation.
|
||||
// It runs a continuous loop to check and reconcile prebuild states, and can be stopped gracefully.
|
||||
|
||||
@@ -27,7 +27,7 @@ type NoopClaimer struct{}
|
||||
|
||||
func (NoopClaimer) Claim(context.Context, uuid.UUID, string, uuid.UUID) (*uuid.UUID, error) {
|
||||
// Not entitled to claim prebuilds in AGPL version.
|
||||
return nil, ErrNoClaimablePrebuiltWorkspaces
|
||||
return nil, ErrAGPLDoesNotSupportPrebuiltWorkspaces
|
||||
}
|
||||
|
||||
func (NoopClaimer) Initiator() uuid.UUID {
|
||||
|
||||
Reference in New Issue
Block a user