mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor(cli): use codersdk for provisioner types (#9508)
This change removes one use of `coderd/database` from the slim binary and more correctly uses codersdk instead of database or provisionerd packages. No size change (yet). Ref: #9380
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"nhooyr.io/websocket"
|
||||
|
||||
"github.com/coder/coder/v2/provisionerd/proto"
|
||||
"github.com/coder/coder/v2/provisionerd/runner"
|
||||
"github.com/coder/coder/v2/provisionersdk"
|
||||
)
|
||||
|
||||
@@ -72,6 +73,12 @@ const (
|
||||
RequiredTemplateVariables JobErrorCode = "REQUIRED_TEMPLATE_VARIABLES"
|
||||
)
|
||||
|
||||
// JobIsMissingParameterErrorCode returns whether the error is a missing parameter error.
|
||||
// This can indicate to consumers that they should check parameters.
|
||||
func JobIsMissingParameterErrorCode(code JobErrorCode) bool {
|
||||
return string(code) == runner.MissingParameterErrorCode
|
||||
}
|
||||
|
||||
// ProvisionerJob describes the job executed by the provisioning daemon.
|
||||
type ProvisionerJob struct {
|
||||
ID uuid.UUID `json:"id" format:"uuid"`
|
||||
|
||||
Reference in New Issue
Block a user