Details
-
Type:
Bug
-
Status: Done
-
Priority:
Low
-
Resolution: Fixed
-
Affects Version/s: 3.10.0, 3.11.0, 3.10.2
-
Component/s: None
-
Labels:
-
Story Points:0
Description
Slurping some docker API json I see:
info: storejson: truncating data container image_info JSON data from 19990 bytes to 4096
storejson() will truncate data to 4096 bytes.
string_mustache() can render a data container to a string larger than 4096 bytes.
bundle agent main { vars: "state" data => datastate(); "state_dump" string => storejson( "state" ), unless => isvariable( $(this.promiser) ); "state_dump3" string => string_mustache("{{%-top-}}", state), unless => isvariable( $(this.promiser) ); reports: "storejson() doesnt match" unless => strcmp( $(state_dump3), $(state_dump) ); "version ${sys.cf_version}"; }
> $ cf-agent -KIf ./datastate.cf info: storejson: truncating data container state JSON data from 36044 bytes to 4096 R: storejson() doesnt match R: version 3.11.0
Strings can contain more than 4096 bytes, there is no reason for storejson() to truncate the strings.