terraform/internal
James Bardin feb7622846 monitor plugin std outputs for unexpected data
Once a plugin process is started, go-plugin will redirect the stdout and
stderr stream through a grpc service and provide those streams to the
client. This is rarely used, as it is prone to failing with races
because those same file descriptors are needed for the initial handshake
and logging setup, but data may be accidentally sent to these
nonetheless.

The usual culprits are stray `fmt.Print` usage where logging was
intended, or the configuration of a logger after the os.Stderr file
descriptor was replaced by go-plugin. These situations are very hard for
provider developers to debug since the data is discarded entirely.

While there may be improvements to be made in the go-plugin package to
configure this behavior, in the meantime we can add a simple monitoring
io.Writer to the streams which will surface th data as warnings in the
logs instead of writing it to `io.Discard`
2021-05-13 16:57:36 -04:00
..
copy deprecate helper/copy 2020-10-08 08:42:16 -04:00
depsfile command/init: Add a new flag `-lockfile=readonly` (#27630) 2021-03-09 11:12:00 -05:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
earlyconfig internal/earlyconfig: staticcheck 2020-12-02 13:59:19 -05:00
getproviders update getproviders tests for new key 2021-04-23 11:18:58 -04:00
grpcwrap providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
helper Grammar nit: "setup" as a verb should be spelled "set up" 2021-01-26 20:39:11 +01:00
initwd use a single log writer 2020-10-19 14:29:54 -04:00
legacy providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
logging monitor plugin std outputs for unexpected data 2021-05-13 16:57:36 -04:00
modsdir
moduletest moduletest: update provider to match recent provider interface changes (#27904) 2021-02-24 12:29:45 -05:00
provider-simple providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
provider-simple-v6 providers.Interface: rename ValidateDataSourceConfig to ValidateDataResourceConfig (#27874) 2021-02-24 12:04:28 -05:00
provider-terraform/main add grpcwrap.Provisioner 2020-12-02 12:45:00 -05:00
providercache command: Experimental "terraform test" command 2021-02-22 14:21:45 -08:00
provisioner-local-exec/main add grpcwrap.Provisioner 2020-12-02 12:45:00 -05:00
replacefile replacefile: don't create the temporary file in TMPDIR 2020-10-20 16:29:59 -07:00
terminal terminal: Helpers for doing fmt-ish operations on the streams 2021-02-12 11:24:13 -08:00
tfplugin5 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
tfplugin6 update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
typeexpr internal/typeexpr: staticcheck 2020-12-02 13:59:19 -05:00