refactor: skip reconciliation for some presets (#17595)

This commit is contained in:
Yevhenii Shcherbina
2025-04-29 07:55:37 -04:00
committed by GitHub
parent 268a50c193
commit 02b2de9ae4
2 changed files with 13 additions and 0 deletions
+4
View File
@@ -72,6 +72,10 @@ type ReconciliationActions struct {
BackoffUntil time.Time
}
func (ra *ReconciliationActions) IsNoop() bool {
return ra.Create == 0 && len(ra.DeleteIDs) == 0 && ra.BackoffUntil.IsZero()
}
// CalculateState computes the current state of prebuilds for a preset, including:
// - Actual: Number of currently running prebuilds
// - Desired: Number of prebuilds desired as defined in the preset