pulumi/pkg/engine
Pat Gavlin c6d22a25e5
gRPC bridge: fix unknowns in Update previews (#6006)
These changes are a combination of three commits, each of which
contributes to the testing and/or fixing of a problem with marshaling
unknowns in `plugin.provider.Update` when `preview` is true.

## deploytest: add support for gRPC adapters. 

These changes add support for communicating with providers using the
gRPC adapters to the deploytest pacakage. This makes it easier to test
the gRPC adapters across typical lifecycle patterns.

Supporting these changes are two additions to the `resource/plugin`
package:

1. A type that bridges between the `plugin.Provider` interface and the
  `pulumirpc.ResourceProviderServer`
2. A function to create a `plugin.Provider` given a
  `pulumirpc.ResourceProviderClient`

The deploytest package uses these to wrap an in-process
`plugin.Provider` in a gRPC interface and connect to it without using
the default plugin host, respectively.

## pulumi_test: test provider preview over gRPC.

Add a test that runs the provider preview lifecycle, but using a
provider that communicates over gRPC.

## gRPC bridge: fix unknowns in `Update` previews

Set the `KeepUnknowns` and `RejectUnknowns` bits in the `MarshalOptions`
used when unmarshaling update results to preserve unknowns during a
preview and reject them otherwise.

These changes also set the `RejectUnknowns` bit in the `MarshalOptions`
used by `Create` if `preview` is false, and fix a bug in the array
unmarshaler that could cause out-of-bounds accesses.

Fixes https://github.com/pulumi/pulumi/issues/6004.
2020-12-23 13:25:48 -08:00
..
lifeycletest gRPC bridge: fix unknowns in Update previews (#6006) 2020-12-23 13:25:48 -08:00
deployment.go Improve resource ref unit tests. (#5960) 2020-12-16 12:38:20 -08:00
destroy.go Rename engine.plan to engine.deployment. (#5777) 2020-11-18 11:16:30 -08:00
diff.go Protect against engine event mutation. (#5003) 2020-07-16 23:52:31 -07:00
engine.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
errors.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
events.go Rename engine.plan to engine.deployment. (#5777) 2020-11-18 11:16:30 -08:00
eventsink.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
import.go Rename engine.plan to engine.deployment. (#5777) 2020-11-18 11:16:30 -08:00
journal.go Refactor lifecycle tests. (#5575) 2020-10-15 10:35:09 -07:00
plugin_host.go Revise host mode. (#5317) 2020-09-14 17:40:17 -07:00
plugins.go .NET: Report plugin install errors during pulumi new (#5760) 2020-11-16 21:56:13 -08:00
plugins_test.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
project.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
query.go .NET: Report plugin install errors during pulumi new (#5760) 2020-11-16 21:56:13 -08:00
refresh.go Rename engine.plan to engine.deployment. (#5777) 2020-11-18 11:16:30 -08:00
snapshot.go Breaking changes due to Feature 2.0 work 2020-04-14 09:30:25 +01:00
update.go Improve resource ref unit tests. (#5960) 2020-12-16 12:38:20 -08:00
update_test.go Improve PP naming for local PPs (#3839) 2020-01-30 13:31:41 -08:00