You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per docs and docker API examples, c.exec_run(cmd, socket=True) should return immediately with socket to be used for process' stdin/out/err as the second value of the returned tuple. However, podman-py waits for the process to finish and it only returns final stdout/err bytes as the output.
Fiddling with stream and tty parameters doesn't make any change in the behaviour.
Given that googling for "PodmanClient" "exec_run" "socket=True" or "PodmanClient" "exec_run" "stdin=True" yields zero results in both cases, maybe it's fine that socket=True isn't implemented, but then socket, stdin and stream parameters to exec_run() shouldn't be mentioned in the docs at all, or at the very least, throw the NotImplementedError exception when calling exec_run() with either of these set to True?
hey @djasa , thanks for the detailed report. you are correct, exec_run differs in the implementation from docker python sdk. There are missing kwargs and some of the functionalities might not be there.
Furthermore, some commands might be in the docs as part of in progress work, then the work was dropped some time ago. We should definitely cleanup the docs a bit.
are you interested in taking care of the implementation of one or more arguments?
are you interested in taking care of the implementation of one or more arguments?
I'm sorry, it's out of my skills, I haven't yet even used socket-based APIs so far. 😅 It will be OK for me to use a call to podman exec as a work around, so even just docs fix or raising the NotImplementedError would be a good fix from my POV.
As per docs and docker API examples,
c.exec_run(cmd, socket=True)
should return immediately with socket to be used for process' stdin/out/err as the second value of the returned tuple. However, podman-py waits for the process to finish and it only returns final stdout/err bytes as the output.Fiddling with
stream
andtty
parameters doesn't make any change in the behaviour.Given that googling for
"PodmanClient" "exec_run" "socket=True"
or"PodmanClient" "exec_run" "stdin=True"
yields zero results in both cases, maybe it's fine thatsocket=True
isn't implemented, but thensocket
,stdin
andstream
parameters toexec_run()
shouldn't be mentioned in the docs at all, or at the very least, throw theNotImplementedError
exception when callingexec_run()
with either of these set toTrue
?versions
Reproducers:
just outputs
Actual results:
type(res[1])
output only appears after 10 sres[1]
is<class 'bytes'>
Expected result:
res
is returned right away and itsoutput
field is socket object for further I/Owith stdin
Expected results:
bash
receives the exit command and ends itselfActual results:
exit
commandThe text was updated successfully, but these errors were encountered: