feat: add prebuilds configuration & bootstrapping (#17527)

Closes https://github.com/coder/internal/issues/508

---------

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
Co-authored-by: Cian Johnston <cian@coder.com>
This commit is contained in:
Danny Kopping
2025-04-25 11:07:15 +02:00
committed by GitHub
co-authored by Cian Johnston
parent e562e3c882
commit 08ad910171
14 changed files with 328 additions and 46 deletions
+25 -2
View File
@@ -11926,6 +11926,9 @@ const docTemplate = `{
"workspace_hostname_suffix": {
"type": "string"
},
"workspace_prebuilds": {
"$ref": "#/definitions/codersdk.PrebuildsConfig"
},
"write_config": {
"type": "boolean"
}
@@ -12005,7 +12008,8 @@ const docTemplate = `{
"notifications",
"workspace-usage",
"web-push",
"dynamic-parameters"
"dynamic-parameters",
"workspace-prebuilds"
],
"x-enum-comments": {
"ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.",
@@ -12013,6 +12017,7 @@ const docTemplate = `{
"ExperimentExample": "This isn't used for anything.",
"ExperimentNotifications": "Sends notifications via SMTP and webhooks following certain events.",
"ExperimentWebPush": "Enables web push notifications through the browser.",
"ExperimentWorkspacePrebuilds": "Enables the new workspace prebuilds feature.",
"ExperimentWorkspaceUsage": "Enables the new workspace usage tracking."
},
"x-enum-varnames": [
@@ -12021,7 +12026,8 @@ const docTemplate = `{
"ExperimentNotifications",
"ExperimentWorkspaceUsage",
"ExperimentWebPush",
"ExperimentDynamicParameters"
"ExperimentDynamicParameters",
"ExperimentWorkspacePrebuilds"
]
},
"codersdk.ExternalAuth": {
@@ -13654,6 +13660,23 @@ const docTemplate = `{
}
}
},
"codersdk.PrebuildsConfig": {
"type": "object",
"properties": {
"reconciliation_backoff_interval": {
"description": "ReconciliationBackoffInterval specifies the amount of time to increase the backoff interval\nwhen errors occur during reconciliation.",
"type": "integer"
},
"reconciliation_backoff_lookback": {
"description": "ReconciliationBackoffLookback determines the time window to look back when calculating\nthe number of failed prebuilds, which influences the backoff strategy.",
"type": "integer"
},
"reconciliation_interval": {
"description": "ReconciliationInterval defines how often the workspace prebuilds state should be reconciled.",
"type": "integer"
}
}
},
"codersdk.Preset": {
"type": "object",
"properties": {