mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
refactor: skip reconciliation for some presets (#17595)
This commit is contained in:
committed by
GitHub
parent
268a50c193
commit
02b2de9ae4
@ -310,6 +310,15 @@ func (c *StoreReconciler) ReconcilePreset(ctx context.Context, ps prebuilds.Pres
|
||||
return nil
|
||||
}
|
||||
|
||||
// Nothing has to be done.
|
||||
if !ps.Preset.UsingActiveVersion && actions.IsNoop() {
|
||||
logger.Debug(ctx, "skipping reconciliation for preset - nothing has to be done",
|
||||
slog.F("template_id", ps.Preset.TemplateID.String()), slog.F("template_name", ps.Preset.TemplateName),
|
||||
slog.F("template_version_id", ps.Preset.TemplateVersionID.String()), slog.F("template_version_name", ps.Preset.TemplateVersionName),
|
||||
slog.F("preset_id", ps.Preset.ID.String()), slog.F("preset_name", ps.Preset.Name))
|
||||
return nil
|
||||
}
|
||||
|
||||
// nolint:gocritic // ReconcilePreset needs Prebuilds Orchestrator permissions.
|
||||
prebuildsCtx := dbauthz.AsPrebuildsOrchestrator(ctx)
|
||||
|
||||
|
Reference in New Issue
Block a user