Skip to content

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

@tejasd1990

Description

@tejasd1990

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions