Open shadeofblue opened 1 year ago
When I was working on https://github.com/golemfactory/yagna/issues/2035 I created an image with a 1mb text file and run the script cat textfile
counting the received bytes.
Not sure what the research is about as the problem is in ya-runtime-vm and the fix was rejected by SDK team because it broke some examples where the background process is not closing stdout/stderr before going to the background.
I think we agreed that the fix might be introduced later but with a flag to notify if the command is expected to wait until stdout/stderr is closed before returning.
There is an example on a branch in yapapi that tests if output command output contains entire expected data https://github.com/golemfactory/yapapi/tree/ld/partial-command-output-issue-example/examples/huge-output-command
this is handled by .core under: https://github.com/golemfactory/yagna/issues/2478
As in rare occasion, output from exe script can be cut at the end. Its hard to tell, who is responsible for that problem, but its good idea to try pin it.
We need to prepare a yapapi example that reproduces an issue where the full output of a command is not returned.
Maybe we could transfer a textfile to the VM, have a script output that to stdout and stderr and verify if what comes back matches what we had transferred. We may also just print a logfile or a very long directory listing.
Todo: