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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stdout is interleaved with stderr and stderr when wrapper is enabled #405

Closed
justinmchase opened this issue Mar 19, 2024 · 2 comments · Fixed by #410
Closed

Stdout is interleaved with stderr and stderr when wrapper is enabled #405

justinmchase opened this issue Mar 19, 2024 · 2 comments · Fixed by #410
Labels
bug Something isn't working
Milestone

Comments

@justinmchase
Copy link

When the wrapper is enabled it appears to buffer all of the stderr and stdout and once terraform exits it displays the stderr and stdout all at once.

The result is the errors tend to be shown at the start of the output rather than the end, and it can sometimes be interleaved with stdout so your errors are extremely hard to read.

Github actions will autoamtically scroll you to the bottom of a log group but the terraform stderr is displayed at the top so you have to always manually scroll all the way to the top just to see the errors.

Ideally the wrapper, would not be buffering the stdout or stderr, but just write it as it comes. And stderr should have the same chrological order that it was recieved with respect to stdout.

@bflad
Copy link
Member

bflad commented Mar 19, 2024

Hi @justinmchase 👋 Thank you for raising this issue and apologies for the frustrating behavior.

It seems you already know this, but for others, the workaround is to disable the wrapper by passing in the terraform_wrapper: false option:

- uses: hashicorp/setup-terraform@v3
  with:
    terraform_wrapper: false

While this disables the GitHub Actions outputs, it should at least prevent this particular issue.

I will forward bug report this along with the related #395 to the responsible team, but unfortunately I do not have any particular insight when it might be prioritized and fixed. If someone is interested in submitting a fix with associated testing, that could speed up the resolution process.

@bflad bflad added the bug Something isn't working label Mar 19, 2024
@justinmchase
Copy link
Author

yes indeed, very related to #395 and I'm not blocked but I just wanted to put this issue on the record as it appears to be distinct from whats reported in the other issue.

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

Successfully merging a pull request may close this issue.

3 participants