golemfactory / yapapi

Python high-level API for Golem.
https://yapapi.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
48 stars 23 forks source link

[research] Prepare an example reproducing partial command output issue #1091

Open shadeofblue opened 1 year ago

shadeofblue commented 1 year ago

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:

evik42 commented 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.

lucekdudek commented 1 year ago

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

jalas167 commented 1 year ago

this is handled by .core under: https://github.com/golemfactory/yagna/issues/2478