-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Command.stdoutpipe fails on GCP Cloud Run #58
Comments
Yep I confirmed the fix, switching from StdoutPipe and StderrPipe to a custom os.Pipe() solved the output issues when in google cloud run. I had to change the pipes in Fix in my fork: Also os.Pipe does not work in Windows environments so there might need to be a better work around in the future. |
@malware-unicorn calling |
@joshblum yeah the
and
Anywhere |
@malware-unicorn calling |
Breaking this out from #55
Google Cloud's serverless container environment is called Cloud Run.
I'm trying to run a bot here in a container, but it kept crashing on calls to
kbc.GetUsername()
. Eventually this was tracked down to be a problem with theCommand("status")
call.The issue is that Cloud Run captures STDOUT and STDERR without duplicating the file descriptors, so those original STDOUT/STDERR FDs are no longer doing what we expect.
getUsername()
expects to shell out tokeybase status
and read its STDOUT, but since the FDs are being hogged by Cloud Run's logging, the output doesn't come back and it ends up timing out as noted in #55.In that issue I recommended 2 potential fixes: using a different FD that we know Cloud Run isn't hogging, or using another API altogether that doesn't involve shelling out to the keybase CLI.
@malware-unicorn PoC'd the first option successfully.
The text was updated successfully, but these errors were encountered: