pulumi/sdk/go/common/resource/plugin
Joe Duffy 61f27fb51a
Fix #3982, missing output which lacks newlines (#8671)
* Fix #3982, missing output which lacks newlines

If the last line printed to stdout or stderr was missing a
terminating newline, it would go entirely missing (in all languages).
The reason for this is a bug in the engine's handling of plugin
outputs: Go's Reader.ReadString('\n') returns a string containing what
was read and/or an error; if the string terminated in a '\n', the
error is nil, and the entire line is returned; if the stream ends,
however, a non-nil error is returned *and* what was read is returned,
even though it wasn't terminated in a newline. The fix is simple:
instead of ignoring that text, we use it, and *then* exit the read-loop.

Also added some test cases since this is subtle and easy to regress.

* Add a changelog entry
2022-01-03 14:39:10 -08:00
..
analyzer.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
analyzer_plugin.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
check.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
config_source.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
context.go Make virtualenv paths relative to root when main points elsewhere (#6966) 2021-05-14 13:41:55 -04:00
doc.go Provider implementer's guide draft (#6322) 2021-04-13 14:11:02 -07:00
host.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
host_server.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
langruntime.go [sdk/nodejs] Warn when a secret config is read as a non-secret (#6896) 2021-05-18 09:48:08 -07:00
langruntime_plugin.go Pipe serverURL through register resource (#8544) 2021-12-17 14:52:01 -08:00
plugin.go Fix #3982, missing output which lacks newlines (#8671) 2022-01-03 14:39:10 -08:00
plugin_test.go Revert flag parse ordering change (#7640) 2021-07-27 12:42:52 -04:00
provider.go Specify fields on engine diff (#8488) 2021-11-30 12:25:27 -08:00
provider_plugin.go [sdk/go] Marshal output values (#7958) 2021-09-27 09:01:40 -07:00
provider_plugin_test.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
provider_server.go Initial support for resource methods (authoring from Node.js, calling from Python) (#7363) 2021-06-30 07:48:56 -07:00
provider_test.go Specify fields on engine diff (#8488) 2021-11-30 12:25:27 -08:00
rpc.go [sdk/go] Marshal output values (#7958) 2021-09-27 09:01:40 -07:00
rpc_rapid_test.go [testing] Add rapid generators for PropertyValues. (#8009) 2021-09-21 15:02:10 -07:00
rpc_test.go Update pkg -> sdk dependency (#8346) 2021-11-03 11:25:20 -07:00