Page MenuHomePhabricator

`webservice shell` loses output when not run with a pty
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create a script test.sh in a tool with contents like this
#!/bin/bash

for ((i=0; i<5; i++)); do
	echo "out line $i"
	sleep 1
done
  • From an external host, attempt to run it like ssh login.toolforge.org become toolname webservice trixie shell bash test.sh (or ssh -T if that doesn't reproduce)

What happens?:

Output something like this

out line 0
warning: couldn't attach to pod/shell-1756490825, falling back to streaming logs:

or occasionally this

warning: couldn't attach to pod/shell-1756490825, falling back to streaming logs: 
out line 0

What should have happened instead?:

out line 0
out line 1
out line 2
out line 3
out line 4

Notes

No, I can't just use ssh -t. The actual thing I'm doing that this is a reduced test case for doesn't give the option.