Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

in exec, stdline aparantly drops some lines with large outputs #749

Closed
tejasd1990 opened this issue Mar 26, 2021 · 3 comments
Closed

in exec, stdline aparantly drops some lines with large outputs #749

tejasd1990 opened this issue Mar 26, 2021 · 3 comments
Labels
bug Something isn't working exec

Comments

@tejasd1990
Copy link

tejasd1990 commented Mar 26, 2021

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 tejasd1990 added the bug Something isn't working label Mar 26, 2021
@thboop thboop added the exec label Apr 30, 2021
@luketomlinson
Copy link
Contributor

@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
Copy link
Contributor

Fixed in #773

@umitkutlu1
Copy link

umitkutlu1 commented Jun 4, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exec
Projects
None yet
Development

No branches or pull requests

4 participants