feat: archive modules in size order until limit is hit (#21773)

Archiving modules attempts to save as many modules as it can before it hits the limit. Enabling the template as much as it can, rather than a hard failure.
This commit is contained in:
Steven Masley
2026-02-02 09:03:18 -06:00
committed by GitHub
parent dd6aec04d7
commit 6b3d4377c3
6 changed files with 336 additions and 20 deletions
+4
View File
@@ -41,3 +41,7 @@ func (l *LimitWriter) Write(p []byte) (int, error) {
l.N += int64(n)
return n, err
}
func (l *LimitWriter) Remaining() int64 {
return l.Limit - l.N
}