feat: graduate prebuilds to general availability (#18607)

This PR removes the prebuilds experiment and allows the use of prebuilds
without opting into an experiment.
This commit is contained in:
Sas Swart
2025-06-26 15:54:52 +02:00
committed by GitHub
parent 872aef3af9
commit c6e0ba12d3
17 changed files with 46 additions and 88 deletions

View File

@ -1150,16 +1150,9 @@ func (api *API) Authorize(r *http.Request, action policy.Action, object rbac.Obj
// nolint:revive // featureEnabled is a legit control flag.
func (api *API) setupPrebuilds(featureEnabled bool) (agplprebuilds.ReconciliationOrchestrator, agplprebuilds.Claimer) {
experimentEnabled := api.AGPL.Experiments.Enabled(codersdk.ExperimentWorkspacePrebuilds)
if !experimentEnabled || !featureEnabled {
levelFn := api.Logger.Debug
// If the experiment is enabled but the license does not entitle the feature, operators should be warned.
if !featureEnabled {
levelFn = api.Logger.Warn
}
levelFn(context.Background(), "prebuilds not enabled; ensure you have a premium license and the 'workspace-prebuilds' experiment set",
slog.F("experiment_enabled", experimentEnabled), slog.F("feature_enabled", featureEnabled))
if !featureEnabled {
api.Logger.Warn(context.Background(), "prebuilds not enabled; ensure you have a premium license",
slog.F("feature_enabled", featureEnabled))
return agplprebuilds.DefaultReconciler, agplprebuilds.DefaultClaimer
}