gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

BlockingProcessStreamReader stalls when a subprocess is waiting on user input

Open jainsahab opened this issue 2 years ago • 1 comments

After analysing https://github.com/googleapis/java-datastore/issues/302 , we have a scenario where in some cases user can run commands which requires user input (manual intervention) and in those cases BlockingProcessStreamReader blocks on the following line waiting for the user input to happen, We do not flush the logs until an error happens, due to this user will never know what happened and there is no way they can pass the user input.

https://github.com/googleapis/google-cloud-java/blob/b72fe9d68c5892b587a5be36ba12b33165a71be9/java-core/google-cloud-core/src/main/java/com/google/cloud/testing/BlockingProcessStreamReader.java#L59

We probably have to put a timeout while starting a subprocess and dump all the startup logs incase the timeout happens, so that user gets the correct feedback.

jainsahab avatar Mar 06 '23 09:03 jainsahab

java-core is sdk-platform-java. Transferred the issue.

suztomo avatar Aug 31 '23 16:08 suztomo

This is a very niche use case of local emulator testing, and the parent issue is not a priority at this moment. Closing as not planned for now, please re-open the issue if the parent issue becomes a priority again.

blakeli0 avatar Jul 18 '24 16:07 blakeli0