Skip to content

Commit 819f53e

Browse files
feat: add CLI option
1 parent 474ad94 commit 819f53e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

codersdk/deployment.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ type PrebuildsConfig struct {
811811
// FailureHardLimit defines the maximum number of consecutive failed prebuild attempts allowed
812812
// before a preset is considered to be in a hard limit state. When a preset hits this limit,
813813
// no new prebuilds will be created until the limit is reset.
814-
FailureHardLimit int64 `json:"failure_hard_limit" typescript:"failure_hard_limit"`
814+
FailureHardLimit serpent.Int64 `json:"failure_hard_limit" typescript:"failure_hard_limit"`
815815
}
816816

817817
const (
@@ -3091,6 +3091,17 @@ Write out the current server config as YAML to stdout.`,
30913091
Annotations: serpent.Annotations{}.Mark(annotationFormatDuration, "true"),
30923092
Hidden: true,
30933093
},
3094+
{
3095+
Name: "Failure Hard Limit",
3096+
Description: "Maximum number of consecutive failed prebuilds before a preset hits the hard limit.",
3097+
Flag: "workspace-prebuilds-failure-hard-limit",
3098+
Env: "CODER_WORKSPACE_PREBUILDS_FAILURE_HARD_LIMIT",
3099+
Value: &c.Prebuilds.FailureHardLimit,
3100+
Default: "3",
3101+
Group: &deploymentGroupPrebuilds,
3102+
YAML: "failure_hard_limit",
3103+
Hidden: ExperimentsSafe.Enabled(ExperimentWorkspacePrebuilds), // Hide setting while this feature is experimental.
3104+
},
30943105
}
30953106

30963107
return opts

0 commit comments

Comments
 (0)