Make the size defaults and the chunk_size minimum 1000-based (closes #313)
check / check (push) Waiting to run
check / check (push) Waiting to run
The chunk_size and blob_size_limit defaults and the chunk_size minimum were 1024-based, while the size parser reads 10MB as 10,000,000 bytes and the docs and info use 1000-based units. So chunk_size: 1MB was rejected, writing out a documented default changed it, and info showed an 11 GB blob limit. They are now 1000-based like the parser. The examples below the 1MB minimum in config.example.yml and the config init template are replaced, and both now state the minimum. Judgement call: s3.part_size keeps its 5MiB to 5GiB bounds, which are S3's own limits, and MiB and GiB stay listed as accepted spellings. Model: opus-5-5
This commit was merged in pull request #373.
This commit is contained in:
@@ -30,13 +30,15 @@ const appName = "vaultik"
|
||||
//nolint:gosec // G101: marker for detecting a pasted secret key, not a credential
|
||||
const secretKeyPrefix = "AGE-SECRET-KEY-"
|
||||
|
||||
// Defaults and validation bounds for tunable settings.
|
||||
// Defaults and validation bounds for tunable settings. MB and GB are
|
||||
// 1000-based, as the size parser reads them; the S3 part sizes are S3's own
|
||||
// limits, which are 1024-based (MiB, GiB).
|
||||
const (
|
||||
defaultBlobSizeLimit = Size(10 * 1024 * 1024 * 1024) // 10GB
|
||||
defaultChunkSize = Size(10 * 1024 * 1024) // 10MB
|
||||
defaultBlobSizeLimit = Size(10 * 1000 * 1000 * 1000) // 10GB
|
||||
defaultChunkSize = Size(10 * 1000 * 1000) // 10MB
|
||||
defaultS3PartSize = Size(5 * 1024 * 1024) // 5MiB
|
||||
defaultCompressionLevel = 3
|
||||
minChunkSize = 1024 * 1024 // 1MB
|
||||
minChunkSize = 1000 * 1000 // 1MB
|
||||
minCompressionLevel = 1
|
||||
maxCompressionLevel = 19
|
||||
// S3 accepts a multipart upload part from 5MiB to 5GiB.
|
||||
|
||||
Reference in New Issue
Block a user