PHP 7.2 stdout and stderr sentinels don't print in a new line
csantanapr opened this issue · 0 comments
csantanapr commented
The user expects output to stdout and stderr to always show in logs.
Sentinels always print fine in 7.1, but not in 7.2
Take the following action example
<?php
function main(array $args) : array {
echo 'hello stdout';
file_put_contents("php://stderr",'hello stderr');
return $args;
}
The test action purposely doesn't print a new line, but the sentinel should printed in a new line for the invoker to pick the output to logs correctly
- Run with the php 7.1 user container image
$ docker run -p 8080:8080 whisk/action-php-v7.1:latest
PHP 7.1.18 Development Server started at Mon Nov 12 21:10:55 2018
hello stderr
XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
hello stdout
XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
- Run with the php 7.2 user container image
$ docker run -p 8080:8080 whisk/action-php-v7.2:latest
PHP 7.2.6 Development Server started at Mon Nov 12 21:10:32 2018
hello stderrXXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
hello stdoutXXX_THE_END_OF_A_WHISK_ACTIVATION_XXX