Skip to content

Commit 8b00a1b

Browse files
authored
fix: Double default APK data size limit (#2060)
We keep hitting this because we have several packages in Chainguard OS that are actually bigger than 4GB. Most of these are larger AI/ML packages This doubles the data size limit for APKs from 4GB to 8GB. 8GB is a perfectly reasonable limit as the second largest APK in Chainguard OS is 7600276722 bytes (the first is... an outlier). There are plenty of other packages that approach this limit as well Signed-off-by: RJ Sampson <rj.sampson@chainguard.dev>
1 parent afe765a commit 8b00a1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/apk/expandapk/options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ package expandapk
1717
// DefaultMaxControlSize is the default maximum decompressed size for control sections (10 MB).
1818
const DefaultMaxControlSize int64 = 10 << 20
1919

20-
// DefaultMaxDataSize is the default maximum decompressed size for data sections (4 GB).
21-
const DefaultMaxDataSize int64 = 4 << 30
20+
// DefaultMaxDataSize is the default maximum decompressed size for data sections (8 GB).
21+
const DefaultMaxDataSize int64 = 8 << 30
2222

2323
// Options configures the behavior of APK expansion operations.
2424
type Options struct {

pkg/options/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func DefaultSizeLimits() SizeLimits {
4848
return SizeLimits{
4949
APKIndexDecompressedMaxSize: 100 << 20, // 100 MB
5050
APKControlMaxSize: 10 << 20, // 10 MB
51-
APKDataMaxSize: 4 << 30, // 4 GB
51+
APKDataMaxSize: 8 << 30, // 8 GB
5252
HTTPResponseMaxSize: 2 << 30, // 2 GB
5353
}
5454
}

0 commit comments

Comments
 (0)