Skip to content

Consider including stderr in error from Init #158

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

Open
radeksimko opened this issue Apr 6, 2021 · 0 comments
Open

Consider including stderr in error from Init #158

radeksimko opened this issue Apr 6, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

One of the nightly E2E tests had failed with the following output:

=== RUN   TestDestroy/basic-0.12.30
    util_test.go:110: [INFO] running Terraform command: /var/folders/6y/gy9gggt14379c_k39vwb50lc0000gn/T/tfinstall342488260/v-0.12.30/terraform init -no-color -force-copy -input=false -lock-timeout=0s -backend=true -get=true -upgrade=false -lock=true -get-plugins=true -verify-plugins=true
    destroy_test.go:16: error running Init in test directory: exit status 2
        2021/04/05 00:22:07 [DEBUG] Using modified User-Agent: Terraform/0.12.30 tfexec-e2etest HashiCorp-terraform-exec/0.13.1

Here exit status 2 is not enough context for further debugging - which is "fine" if it's just a nightly test (although annoying), but it may not be that great for a consumer leveraging Init() and needing to debug similar error.

which makes me wonder if it's worth either:

  1. Including stderr in the error at all times (for commands that otherwise don't expose stderr), or
  2. Revisiting the idea of custom error types, which was initially binned due to worries about breaking compatibility when exploring ways of resolving Provide better errors caused by context cancellation #107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant