You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading a binary file into a string using file::read within a bolt plan causes apply blocks to fail.
I am able to use the write_file function to write the binary file out to systems and this works as expected.
Expected Behavior
Apply blocks should still function even if a binary file is read into a string variable.
Steps to Reproduce
Steps to reproduce the behavior:
Read binary file into a string.
$test_file = file::read('/usr/bin/vim')
Attempt to use an apply block in the same plan. You don't need to use this variable in the apply block. Its existence within the plan is enough to cause it to fail.
When the plan is run, the apply blocks will fail with the following message.
Failed on ip-10-64-194-133.ap-southeast-2.compute.internal:
Apply failed to compile for ip-10-64-194-133.ap-southeast-2.compute.internal: source sequence is illegal/malformed utf-8
Thanks for the report. Yeah variables in plan scope need to be serialized to json to be passed to the compile process. My guess is that something along the way is choking on that. From a quick glance it looks like our data converter is being invoked with rich_data option
Describe the Bug
Reading a binary file into a string using file::read within a bolt plan causes apply blocks to fail.
I am able to use the write_file function to write the binary file out to systems and this works as expected.
Expected Behavior
Apply blocks should still function even if a binary file is read into a string variable.
Steps to Reproduce
Steps to reproduce the behavior:
Read binary file into a string.
Attempt to use an apply block in the same plan. You don't need to use this variable in the apply block. Its existence within the plan is enough to cause it to fail.
When the plan is run, the apply blocks will fail with the following message.
Environment
Additional Context
I'm assuming this is occurring as local variables from the plan are accessible within the apply block. When transforming the value for the apply block its expecting utf8. https://dev.to/bajena/solving-invalid-byte-sequence-in-utf-8-errors-in-ruby-1f27
The text was updated successfully, but these errors were encountered: