in exec, stdline aparantly drops some lines with large outputs
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 you have found a security issue please submit it here
- If you have questions about writing workflows or action files, then please visit the GitHub Community Forum's Actions Board
- If you are having an issue or question about GitHub Actions then please contact customer support
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
stdoutsince 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
stdlinelistener with large outputs, when it appears to be working withstdouteven 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-deployaction 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 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).
Fixed in #773
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.