Enforce the retained history node limit

This commit is contained in:
2026-10-25 22:04:54 +00:00
parent 4fcff5f453
commit 12d350a292
9 changed files with 395 additions and 84 deletions

View File

@@ -48,6 +48,10 @@ type acquiredUnderlayGroup struct {
}
func loadGroupedWithSecretLookup[T any](request loadRequest[T], secrets SecretBinding, lookup secretLookup) (*Loaded[T], error) {
return loadGroupedWithSecretLookupLimit(request, secrets, lookup, historyNodeLimit)
}
func loadGroupedWithSecretLookupLimit[T any](request loadRequest[T], secrets SecretBinding, lookup secretLookup, historyLimit int) (*Loaded[T], error) {
request.ordinary = false
defaults, policy, diagnostics := loadSettings(request.importDefaults, request.definition, request.sourceVersionMode)
request.importDefaults = defaults
@@ -76,7 +80,7 @@ func loadGroupedWithSecretLookup[T any](request loadRequest[T], secrets SecretBi
if len(diagnostics) != 0 {
return nil, (&diagnosticAccumulator{diagnostics: canonicalDiagnostics(diagnostics)}).loadError()
}
return executeLoadRequest(request, secrets, lookup)
return executeLoadRequest(request, secrets, lookup, historyLimit)
}
func assembleLayeredInput[T any](request loadRequest[T], input assembledInput, policy acquisitionPolicy, state *acquisitionState) (assembledInput, []Diagnostic) {