Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

increase the maxBuffer to avoid truncated process stdout resulting in truncated/invalid JSON results (ie. ansible-lint) #638

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

fdie
Copy link
Contributor

@fdie fdie commented Feb 15, 2024

My ansible-lint resulting JSON document report is very large (~1MB), therefore exceeding the I/O buffer and is truncated and could not be parsed (invalid json), see the error below:

Could not parse ansible-lint output. Please check your ansible-lint installation & configuration. More info in Ansible Server output.:
Type number and or click with the mouse (q or empty cancels):

This issue could be solved by increasing the maxBuffer property in the src/utils/commandRunner.ts file:

    const result = await asyncExec(command, {
      encoding: "utf-8",
      cwd: currentWorkingDirectory,
      env: runEnv,
+      maxBuffer: 10 * 1000 * 1000,
    });

… truncated/invalid JSON results (ie. ansible-lint)
@fdie fdie requested a review from a team as a code owner February 15, 2024 01:59
@github-actions github-actions bot added the bug Something isn't working label Feb 15, 2024
@priyamsahoo priyamsahoo merged commit dcbfafc into ansible:main Feb 16, 2024
12 checks passed
@fdie fdie deleted the fix_invalid_huge_json branch February 16, 2024 08:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants