Fix log stream hang after failed cached builds#235
Conversation
Greptile SummaryThis PR fixes a log-stream hang that occurred when a runtime was removed (e.g., after a failed cached build) while a
Confidence Score: 4/5The fix correctly closes the stream for the primary failure scenario; a fast-failing build that never emits timing data can still leave the stream open until the configured timeout. The timer callback change is tightly scoped and backed by a negative-control regression test. The proc_terminate call is gated on !empty($logsProcess), meaning a build that completes (or fails) before the tail -F process has had a chance to emit any output — before $logsProcess is set — bypasses the termination path and the stream stays open until $timeout expires. src/Executor/Runner/Docker.php — specifically the !empty($logsProcess) guard, which is the remaining gap in the fix. Important Files Changed
Reviews (2): Last reviewed commit: "fix: flush logs before terminating missi..." | Re-trigger Greptile |
Summary
/logsVerification
./vendor/bin/pint --test --config pint.json src/Executor/Runner/Docker.php tests/e2e/ExecutorTest.phpdocker run --rm --network executor_runtimes -v "$PWD":/app -w /app executor-openruntimes-executor ./vendor/bin/phpunit --configuration phpunit.xml --filter testLogStreamClosesAfterFailedCachedBuilddocker run --rm --network executor_runtimes -v "$PWD":/app -w /app executor-openruntimes-executor ./vendor/bin/phpunit --configuration phpunit.xml --testsuite=unitNegative Control
testLogStreamClosesAfterFailedCachedBuildfailed because/logsstayed open for ~13.57s instead of closing promptly