Closed justinmchase closed 6 months ago
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 https://github.com/hashicorp/setup-terraform/issues/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.
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.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
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.