Name the setting and value when a size does not parse (closes #429)
check / check (push) Successful in 9m51s

A size setting such as chunk_size: banana failed with "invalid size
format: strconv.ParseFloat: parsing "": invalid syntax", naming neither
the setting nor the value. The size decoder now quotes the value, and
Parse checks every size setting after ${...} references are filled in,
so the error reads chunk_size: "banana" is not a size; use a number of
bytes or a unit such as 10MB. This covers chunk_size, blob_size_limit
and s3.part_size, and config set.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-11 04:18:36 +00:00
1 parent d8d13d1c8b
commit c33639cb69
5 files changed
+169 -17

No files matched your search

+1 -1
View File
@@ -252,7 +252,7 @@ func TestConfigSetKeepsFileThatWouldNotLoad(t *testing.T) {
{configWithoutRecipients, "snapshots.home.paths", "/srv",
"into []string"},
{configWithoutRecipients, "chunk_size", "fast",
"invalid size format"},
`chunk_size: "fast" is not a size`},
// Values of the right type that fail validation.
{configWithoutRecipients, "compression_level", "99",
"compression_level must be between 1 and 19"},