mirror of
https://github.com/coder/coder.git
synced 2025-07-10 23:53:15 +00:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user