toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

in exec, stdline aparantly drops some lines with large outputs

Open tejasd1990 opened this issue 5 years ago • 3 comments

Thank you 🙇‍♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

If your issue is relevant to this repository, please include the information below:

Describe the bug We are using exec in our arm-deploy action. Currently, we are using stdout and stdline listeners to collect the error and output. In stdline , it appears that some lines are not being received. We expect a JSON in the output, and we are getting JSON parsing errors. We confirmed this by printing whatever is received in the listener. This issue occurs persistently for large outputs, but not for small outputs. We have customers reporting this issue to us. We changed the stdline to stdout and so far while testing with it, we did not hit this issue.

We used stdline in the first place because since we expect the output to be in JSON format, our assumption is that the libraries could be emitting debug/command messages in between, which will break JSON parsing if we use stdout. So our strategy was to remove any debug/command messages from the output, and collect the actual JSON output. Questions:

  • Is the assumption correct? If no, then we can use stdout since the issue does not seem to be happening with it.
  • If the assumption is correct, will the strategy we are using(i.e. to remove the [debug] and [command] lines) work?
  • Why is the issue happening when we use stdline listener with large outputs, when it appears to be working with stdout even with large outputs?
  • If using stdline listener, some lines are not being received because of any error in sending/listening, then can we use retry anywhere? How to track sequence of the lines?

To Reproduce Steps to reproduce the behavior:

  • Use the arm-deploy action in a workflow. Deploy a template which will create a large number of resoruces(The example i used to repro our customer issue was a template which 200 resources in a loop with a batchsize of 10 resources, so the output is pretty huge in this case)
  • The action fails due to JSON parsing error

Expected behavior

  • The action should succeed. It would succeed with small outputs

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Any

Smartphone (please complete the following information):

  • Any

Additional context Add any other context about the problem here.

tejasd1990 avatar Mar 26 '21 16:03 tejasd1990

@tejasd1990 Do you have a ballpark size (maybe number of lines?) where this begins to break down and seems to drop lines? Or size that seems to work?

As to your other question, I believe you would be fine to hook into the stdout listener as it will just stream the stdout of the child process. The stdline listener just streams stdout one line at a time (also from the child process).

luketomlinson avatar May 17 '21 20:05 luketomlinson

Fixed in #773

luketomlinson avatar Jun 02 '21 20:06 luketomlinson

Am 02.06.2021 22:30 schrieb Luke Tomlinson @.***>: Fixed in #773

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

umitkutlu1 avatar Jun 04 '21 19:06 umitkutlu1